Class RepositoryCreateRequest
java.lang.Object
com.atlassian.bitbucket.repository.AbstractRepositoryRequest
com.atlassian.bitbucket.repository.RepositoryCreateRequest
Defines the properties that can be set when creating a new
Repository
. To reduce backwards compatibility
issues as new properties are added over time, instances of this class may only be created using its RepositoryCreateRequest.Builder
.
The following properties are required:
AbstractRepositoryRequest.getName()
: The name for the new repositorygetProject()
: The project to contain the repositorygetScmId()
: The SCM type for the new repository
otherwise specified
, the new repository will be forkable
by default.
Unless otherwise specified
, the new repository will not be public
by default.
The repository's slug
, which is used in URLs (both for the browser and when cloning),
will be generated from the provided AbstractRepositoryRequest.getName()
. Both the name and the generated slug must be unique within
the project
or the repository cannot be created.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.bitbucket.repository.AbstractRepositoryRequest
AbstractRepositoryRequest.AbstractBuilder<B extends AbstractRepositoryRequest.AbstractBuilder<B>>
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the default branch name that should be set when the repository is created.Retrieves the project in which the new repository will be created.getScmId()
Retrieves the SCM ID, defining the SCM to be used for the new repository.Methods inherited from class com.atlassian.bitbucket.repository.AbstractRepositoryRequest
getDescription, getName, isForkable, isPublic
-
Method Details
-
getDefaultBranch
Retrieves the default branch name that should be set when the repository is created. If no default branch name is specified the instance-level default branch name will be used instead. If no instance-level default has been configured, the SCM's default (which may change over time) will be used.- Returns:
- the default branch name, which may be
null
to use the instance- or SCM-level default - Since:
- 7.5
-
getProject
Retrieves the project in which the new repository will be created.- Returns:
- the destination project
-
getScmId
Retrieves the SCM ID, defining the SCM to be used for the new repository. Once created, the SCM for a given repository cannot be changed.- Returns:
- the SCM for the new repository
-