public interface

MergeRequestCheckService

com.atlassian.bitbucket.scm.pull.MergeRequestCheckService

Class Overview

A service that checks preconditions for pull request merges by applying RepositoryMergeChecks, which can be supplied by plugins, to determine whether merges should performed.

Summary

Public Methods
@Nonnull Collection<PullRequestMergeVeto> check(PullRequest pullRequest)
Applies all registered and enabled RepositoryMergeChecks to determine if a pull request merge should proceed.

Public Methods

@Nonnull public Collection<PullRequestMergeVeto> check (PullRequest pullRequest)

Applies all registered and enabled RepositoryMergeChecks to determine if a pull request merge should proceed. If any check vetoes the MergeRequest then the merge should not be performed. A PullRequestMergeVeto will be returned for each failed check. If no checks veto the merge it should be allowed to proceed.

Parameters
pullRequest the pull request
Returns
  • a collection containing zero or more vetoes, where an empty collection indicates the merge should be allowed to proceed