API to override default behavior of "Merge" button on pull requests

Issue #15717 closed
Brett Cashman
created an issue

We'd like to be able to override the default behavior of the "Merge" button on pull requests -- specifically, we'd like to be able to disable/gray it out by default, and enable it only when various automated tests have run. Currently the button is active even when merges are impossible due to merge checks.

Comments (2)

  1. Alastair Wilkes staff

    Hi Brett,

    You should be able to accomplish this already in Bitbucket by checking the Prevent a merge with unresolved merge checks checkbox in the branch permissions dialog (note: this feature is only available on the Premium plan)

    Doing so will deactivate the merge button until all merge checks are passed, such as checking the last commit for N successful builds and no failed builds:

    enforced merge checks.png

    As a result, we don't plan to add an API to accomplish the same behavior.

    Bitbucket PM

  2. Log in to comment