@Deprecated public interface

MergeRequestCheck

com.atlassian.bitbucket.scm.pull.MergeRequestCheck

This interface is deprecated.
in 5.0 for removal in 6.0. Use a repository-merge-check module and implement RepositoryMergeCheck instead. Set configurable="false" on the module to create a hook that is enabled for all repositories.

Class Overview

Used to enforce a specific precondition for a merge operation.

Merge checks are called for:

isDryRun() can be used to determine which operation is in progress, for implementations which should only be applied to one or the other (but most checks should apply the same way to both).

Summary

Public Methods
void check(MergeRequest request)
Called when a merge has been requested, allowing plugins to apply custom rules to validate whether the merge should proceed.

Public Methods

public void check (MergeRequest request)

Called when a merge has been requested, allowing plugins to apply custom rules to validate whether the merge should proceed. If any MergeRequestCheck vetoes the merge, it will not be performed. Veto messages from the failed checks will be shown to the merging user.

Implementations of this method should not throw exceptions. Exceptions are not considered vetoes; they are considered an indication that the implementation is broken and will be logged and ignored, with the merge is allowed to proceed unless another check happens to veto it.

Parameters
request the merge in progress