Package com.atlassian.bitbucket.pull
Interface PullRequestMergeStrategy
public interface PullRequestMergeStrategy
Describes a strategy for merging a pull request. Some strategies may only merge changes, producing
one or more new commits, while others might merge commits, applying the pull request's commits to
its target. Each strategy includes a brief
description
to help explain its approach
to performing merges.- Since:
- 4.9
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves a short, descriptive summary of how the strategy performs merges, which can be used to help choose between available strategies.getFlag()
Retrieves a well-known flag, or combination of flags, associated with the strategy, which may be helpful in associating the strategy with the behavior of a command line client.getId()
Retrieves the strategy's unique identifier, which is used torequest the strategy
when merging a pull request.getName()
Retrieves the strategy's name.boolean
Retrieves a flag indicating whether or not the strategy is enabled.
-
Method Details
-
getDescription
Retrieves a short, descriptive summary of how the strategy performs merges, which can be used to help choose between available strategies.- Returns:
- a short, descriptive summary the strategy
-
getFlag
Retrieves a well-known flag, or combination of flags, associated with the strategy, which may be helpful in associating the strategy with the behavior of a command line client. Some strategies, which are built by extending or overriding standard SCM functionality, may not have flags associated with them.- Returns:
- a well-known flag, or combination of flags, associated with the strategy, which may be
Optional.empty()
if such flags don't exist, but nevernull
-
getId
Retrieves the strategy's unique identifier, which is used torequest the strategy
when merging a pull request.- Returns:
- a unique identifier for the strategy, used to request the strategy when merging
-
getName
Retrieves the strategy's name.- Returns:
- the strategy's name
-
isEnabled
boolean isEnabled()Retrieves a flag indicating whether or not the strategy is enabled. Only enabled strategies may berequested
when merging pull requests. Each repository is guaranteed to have at least one enabled strategy.Administrators can configure the set of strategies they want to be available for pull requests in their repositories and may choose to enable a single strategy, to ensure all pull requests are merged the same way, or multiple strategies, to allow the most appropriate strategy to be selected at merge time based on the particulars of the pull request being merged.
- Returns:
true
if this strategy is enabled and may be requested when merging a pull request; otherwise,false
if an administrator has disabled this strategy
-