Package com.atlassian.bitbucket.scm
Class MergeCommandParameters
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.scm.AbstractCommandParameters
com.atlassian.bitbucket.scm.AbstractMergeCommandParameters
com.atlassian.bitbucket.scm.MergeCommandParameters
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
MergeCommandParameters.AbstractMergeBuilder<B extends MergeCommandParameters.AbstractMergeBuilder<B>>
static class
Nested classes/interfaces inherited from class com.atlassian.bitbucket.scm.AbstractMergeCommandParameters
AbstractMergeCommandParameters.AbstractBuilder<B extends AbstractMergeCommandParameters.AbstractBuilder<B>>
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the specific commit that should be merged into thetarget branch
.Retrieves the specific commit that thetarget branch
should be at.boolean
Retrieves a flag indicating whether these parameters include afrom repository
, indicating the merge is cross-repository, where the to repository is provided when requesting the merge command rather than in these parameters.Methods inherited from class com.atlassian.bitbucket.scm.AbstractMergeCommandParameters
getAuthor, getCommitSummaries, getCommitter, getMessage, getStrategyId, isDryRun
Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Constructor Details
-
MergeCommandParameters
-
-
Method Details
-
getFromBranch
-
getFromCommitId
Retrieves the specific commit that should be merged into thetarget branch
.If this value is not provided, the current tip of the
source branch
is merged into the target. This should be used with caution, as it may result in the system performing a different merge than intended if the source branch changes between when the merge is requested and when it is performed.- Returns:
- the specific commit to merge in, or
null
to merge the current tip of thebranch
-
getFromRepository
- Returns:
- the from repository, or
null
if the from and to branches are in the same repository
-
getToBranch
-
getToCommitId
Retrieves the specific commit that thetarget branch
should be at.If this value is provided and the current tip of
target branch
does not match this value, the merge will not be performed and anexception
will be thrown.If this value is not provided, the merge will occur on top of the current tip of the target branch.
- Returns:
- the specific commit that the target branch should be at, or
null
to perform the merge on top of the current tip of thetarget branch
- Since:
- 7.8
-
hasFromRepository
public boolean hasFromRepository()Retrieves a flag indicating whether these parameters include afrom repository
, indicating the merge is cross-repository, where the to repository is provided when requesting the merge command rather than in these parameters.- Returns:
true
if afrom repository
is set; otherwise,false
-