Package com.atlassian.bitbucket.pull
Class PullRequestMergeRequest
java.lang.Object
com.atlassian.bitbucket.pull.AbstractPullRequestRequest
com.atlassian.bitbucket.pull.PullRequestMergeRequest
Describes a request to
merge a PullRequest.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.atlassian.bitbucket.pull.AbstractPullRequestRequest
AbstractPullRequestRequest.AbstractBuilder<T extends AbstractPullRequestRequest.AbstractBuilder<T>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the commit message to use when merging the pull request.Retrieves theIDof the strategy to use when merging the pull request.intRetrieves the expectedversionfor the pull request.booleanRetrieves a flag indicating whether the system should prepend an auto-generated subject to the providedmessage.Methods inherited from class com.atlassian.bitbucket.pull.AbstractPullRequestRequest
getPullRequestId, getRepositoryId
-
Constructor Details
-
PullRequestMergeRequest
-
-
Method Details
-
getMessage
Retrieves the commit message to use when merging the pull request.If
isAutoSubject()istrue, the system will prepend an auto-generated subject to the message provided here. Otherwise, if it'sfalse, the provided message will be used as-is.While this is part of the API for merging pull requests, the underlying SCM performing the merge ultimately decides the exact shape of the final commit message. For example, when performing a fast-forward "merge" in Git, any commit message provided here is ignored because the "merge" does not actually create a new commit. Additionally, the SCM may, at its own discretion, augment the provided commit message with more detail. For example, the Git SCM appends the summary from each merged commit to the message.
- Returns:
- the commit message for the pull request
-
getStrategyId
Retrieves theIDof the strategy to use when merging the pull request. If a strategy has not been specified, thedefault strategyfor thetarget repositoryis used. Onlyenabledstrategies may be requested.- Returns:
- the strategy to use when merging the pull request, or
nullto use the default - Since:
- 4.9
-
getVersion
public int getVersion()Retrieves the expectedversionfor the pull request. If the pull request's actual version does not match, aPullRequestOutOfDateExceptionwill be thrown to indicate that the merge was requested on stale data.- Returns:
- the pull request version to merge
-
isAutoSubject
public boolean isAutoSubject()Retrieves a flag indicating whether the system should prepend an auto-generated subject to the providedmessage. If no message is provided, this will always betrue.- Returns:
trueif no message was provided, or if an auto-generated subject should be prepended to it; otherwise,falseto use the provided message as-is- Since:
- 5.7
-