Rate this page:
Deprecated in 5.0
The merge-check module type has been deprecated in Bitbucket Server 5.0 and will be removed in 6.0. Please use the repository-merge-check module type instead. More details can be found in the Repository Hooks and Merge Checks Guide.
A merge request check module defines a Java component that can veto a request by a user to merge a pull request. A vetoed pull request will be prevented from merging and feedback is given to the user explaining why the merge can't proceed.
Example merge request checks might include:
Note: although merge request checks restrict the merge operation within Bitbucket Server, they do not prevent users from merging branches in their local clones and pushing this change. Please look at branch permissions for this functionality.
The root element for the Merge Request Check plugin module is <merge-check/>
. It allows the following two attributes for
configuration:
Name | Required | Description | Default |
---|---|---|---|
key | Yes | The identifier of the plugin module. This key must be unique within the plugin where it is defined. | N/A |
class | Yes | The fully qualified Java class name of merge request check. This class must implement MergeRequestCheck. | N/A |
Here is an example atlassian-plugin.xml
file containing a single merge check:
1 2<atlassian-plugin name="My Merge Request Check" key="example.plugin.mycheck" plugins-version="2"> <plugin-info> <description>A basic component import module test</description> <vendor name="My Company" url="http://www.mycompany.com"/> <version>1.0</version> </plugin-info> <merge-check key="myMergeCheck" class="com.mycompany.example.plugin.myCheck.MyMergeRequestCheck"/> </atlassian-plugin>
See also the tutorial on Controlling when pull requests can be merged
Rate this page: