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 Type
    Method
    Description
    Retrieves a short, descriptive summary of how the strategy performs merges, which can be used to help choose between available strategies.
    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.
    Retrieves the strategy's unique identifier, which is used to request the strategy when merging a pull request.
    Retrieves the strategy's name.
    boolean
    Retrieves a flag indicating whether or not the strategy is enabled.
  • Method Details

    • getDescription

      @Nonnull String 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

      @Nonnull Optional<String> 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 never null
    • getId

      @Nonnull String getId()
      Retrieves the strategy's unique identifier, which is used to request the strategy when merging a pull request.
      Returns:
      a unique identifier for the strategy, used to request the strategy when merging
    • getName

      @Nonnull String 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 be requested 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