Package com.atlassian.bitbucket.scm
Class ForkCommandParameters
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.scm.AbstractCommandParameters
com.atlassian.bitbucket.scm.ForkCommandParameters
public class ForkCommandParameters
extends com.atlassian.bitbucket.scm.AbstractCommandParameters
Describes the fork being created.
 
 RepositoryService.fork(RepositoryForkRequest) is used to create forks. That service creates the fork
 Repository in the database, and then calls PluginExtendedCommandFactory.fork(com.atlassian.bitbucket.repository.Repository, com.atlassian.bitbucket.scm.ForkCommandParameters) to create it on
 disk. As with other commands, the origin repository, which already exists both
 in the database and on disk, is provided as the first argument when creating the fork command.
 The fork repository, which only exists in the database, is provided in these parameters.
- Since:
- 4.6
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class com.atlassian.bitbucket.util.BuilderSupportNOT_BLANK
- 
Method SummaryModifier and TypeMethodDescriptionRetrieves the default branch that should be set for the fork after it's created.com.atlassian.bitbucket.repository.RepositorygetFork()Retrieves the fork repository, which is expected to have already been created in the database and have a validID.Methods inherited from class com.atlassian.bitbucket.util.BuilderSupportaddIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
- 
Method Details- 
getFork@Nonnull public com.atlassian.bitbucket.repository.Repository getFork()Retrieves the fork repository, which is expected to have already been created in the database and have a validID. The SCM will use thisRepositoryto create the fork on disk and initialize it from itsorigin, which is supplied as the first parameter toPluginExtendedCommandFactory.fork(com.atlassian.bitbucket.repository.Repository, com.atlassian.bitbucket.scm.ForkCommandParameters)when creating theCommand.- Returns:
- the fork repository, which exists in the database but not on disk
 
- 
getDefaultBranchRetrieves the default branch that should be set for the fork after it's created. If the default branch isn't specified, the fork will inherit its origin's default branch.- Returns:
- the default branch to set, or nullto inherit the origin's default branch
- Since:
- 7.5
 
 
-