Class GHCreateRepositoryBuilder


  • public class GHCreateRepositoryBuilder
    extends Object
    Creates a repository
    Author:
    Kohsuke Kawaguchi
    • Field Detail

      • builder

        protected final org.kohsuke.github.Requester builder
    • Method Detail

      • description

        public GHCreateRepositoryBuilder description​(String description)
        Description for repository
        Parameters:
        description - description of repository
        Returns:
        a builder to continue with building
      • homepage

        public GHCreateRepositoryBuilder homepage​(URL homepage)
        Homepage for repository
        Parameters:
        homepage - homepage of repository
        Returns:
        a builder to continue with building
      • homepage

        public GHCreateRepositoryBuilder homepage​(String homepage)
        Homepage for repository
        Parameters:
        homepage - homepage of repository
        Returns:
        a builder to continue with building
      • private_

        public GHCreateRepositoryBuilder private_​(boolean enabled)
        Creates a private repository
        Parameters:
        enabled - private if true
        Returns:
        a builder to continue with building
      • issues

        public GHCreateRepositoryBuilder issues​(boolean enabled)
        Enables issue tracker
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • projects

        public GHCreateRepositoryBuilder projects​(boolean enabled)
        Enables projects
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • wiki

        public GHCreateRepositoryBuilder wiki​(boolean enabled)
        Enables wiki
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • downloads

        public GHCreateRepositoryBuilder downloads​(boolean enabled)
        Enables downloads
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • autoInit

        public GHCreateRepositoryBuilder autoInit​(boolean enabled)
        If true, create an initial commit with empty README.
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • allowSquashMerge

        public GHCreateRepositoryBuilder allowSquashMerge​(boolean enabled)
        Allow or disallow squash-merging pull requests.
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • allowMergeCommit

        public GHCreateRepositoryBuilder allowMergeCommit​(boolean enabled)
        Allow or disallow merging pull requests with a merge commit.
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • allowRebaseMerge

        public GHCreateRepositoryBuilder allowRebaseMerge​(boolean enabled)
        Allow or disallow rebase-merging pull requests.
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • gitignoreTemplate

        public GHCreateRepositoryBuilder gitignoreTemplate​(String language)
        Creates a default .gitignore
        Parameters:
        language - template to base the ignore file on
        Returns:
        a builder to continue with building See https://developer.github.com/v3/repos/#create
      • licenseTemplate

        public GHCreateRepositoryBuilder licenseTemplate​(String license)
        Desired license template to apply
        Parameters:
        license - template to base the license file on
        Returns:
        a builder to continue with building See https://developer.github.com/v3/repos/#create
      • team

        public GHCreateRepositoryBuilder team​(GHTeam team)
        The team that gets granted access to this repository. Only valid for creating a repository in an organization.
        Parameters:
        team - team to grant access to
        Returns:
        a builder to continue with building
      • templateRepository

        @Preview
        @Deprecated
        public GHCreateRepositoryBuilder templateRepository​(boolean enabled)
        Deprecated.
        Specifies whether the repository is a template.
        Parameters:
        enabled - true if enabled
        Returns:
        a builder to continue with building
      • owner

        public GHCreateRepositoryBuilder owner​(String owner)
        Specifies the ownership of the repository.
        Parameters:
        owner - organization or personage
        Returns:
        a builder to continue with building
      • create

        public GHRepository create()
                            throws IOException
        Creates a repository with all the parameters.
        Returns:
        the gh repository
        Throws:
        IOException - if repsitory cannot be created