public class PullRequestMergeRequest extends AbstractPullRequestRequest
merge
a PullRequest
.Modifier and Type | Class and Description |
---|---|
static class |
PullRequestMergeRequest.Builder |
AbstractPullRequestRequest.AbstractBuilder<T extends AbstractPullRequestRequest.AbstractBuilder<T>>
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getContext()
Retrieves additional supplementary context for the merge request.
|
String |
getMessage()
Retrieves the commit message to use when merging the pull request.
|
String |
getStrategyId()
Retrieves the
ID of the strategy to use when merging the pull request. |
int |
getVersion()
Retrieves the expected
version for the pull request. |
boolean |
isAutoSubject()
Retrieves a flag indicating whether the system should prepend an auto-generated subject to the provided
message . |
getPullRequestId, getRepositoryId
@Nonnull public Map<String,Object> getContext()
RepositoryMergeCheck
s run before the merge is performed and is also included in the
PullRequestMergedEvent
raised after the merge
is completed.null
@Nullable public String getMessage()
If isAutoSubject()
is true
, the system will prepend an auto-generated subject to the message
provided here. Otherwise, if it's false
, 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.
@Nullable public String getStrategyId()
ID
of the strategy to use when merging the pull request.
If a strategy has not been specified, the default strategy
for the target repository
is used. Only enabled
strategies may be requested.null
to use the defaultpublic int getVersion()
version
for the pull request. If the pull request's
actual version does not match, a PullRequestOutOfDateException
will be thrown to indicate that the
merge was requested on stale data.public boolean isAutoSubject()
message
. If no message is provided, this will always be true
.true
if no message was provided, or if an auto-generated subject should be prepended to
it; otherwise, false
to use the provided message as-isCopyright © 2022 Atlassian. All rights reserved.