Customers have installed this add-on in at least 1,173 active instances.
    by Atlassianfor Bitbucket Server 4.0.0 - 4.14.4 and more versions
    Versions available for Bitbucket Server 2.2.0 - 3.11.6
    This add-on isn't formally supported, but you can ask a question via Atlassian Answers.

    Ask a question

    Atlassian supports this add-on.

    Get support

    Data Center
    This add-on is compatible with the clustering and high-availability capabilities of our products.
    Get it nowFree add-on

    Rejects pushes that delete branches involved in active (not merged/declined) pull requests

    Rejects pushes that delete branches involved in active (not merged/declined) pull requests

    Configure your hooks

    On push the hook will check and reject the push

    Once merged or declined deletes are allowed again

    Enable this hook through your repository settings.

    If you try to delete an unmerged branch the hook will check for this and reject the push.

    When the target branch is merged or declined it will be again possible to delete it.

    More details

    There are no additional details.

    User reviews

    Sign in to write a review
    by Andrei Neculau on 2015-08-20
    A closed PR seems to block the branch from getting deleted as well. Doesn't make sense at all. This is a total blocker, in conjunction with https://jira.atlassian.com/browse/STASH-2901
    Was this review helpful?YesNo

    Hi Andrei,

    Are you able to provide version numbers for both the plugin and Stash. I have tested with the most recent versions, 1.1 and 3.11.2 respectively, and experienced no problem. Once a PR was either merged or declined the source and target branches could be deleted.

    If you are able to provide more information I would suggest opening an Atlassian Answers question. To do this please go to the "Support" tab here in marketplace and click on "Atlassian Answers". We would be happy to help you to address this problem there.

    by Mark de Bont on 2014-08-14
    Would expect this to be a default behaviour of Stash.
    Was this review helpful?YesNo


    Atlassian provides support for this add-on.

    Vendor support resources

    Atlassian Community

    Atlassian-hosted discussions connect you to other customers who use this add-on.


    Version 2.1.0 Bitbucket Server 4.0.0 - 4.14.4 Released 2016-08-08


    Compatible with Bitbucket Data Center


    • Marked as compatible with Bitbucket Data Center


    1. Log into your Bitbucket instance as an admin.
    2. Click the admin dropdown and choose Add-ons. The Manage add-ons screen loads.
    3. Click Find new add-ons from the left-hand side of the page.
    4. Locate Bitbucket Server Protect Unmerged Hook via search. Results include add-on versions compatible with your Bitbucket instance.
    5. Click Install to download and install your add-on.
    6. You're all set! Click Close in the Installed and ready to go dialog.

    To find older Bitbucket Server Protect Unmerged Hook versions compatible with your instance, you can look through our version history page.

    Similar add-ons