Customers have installed this add-on in at least 2,071 active instances.
    by Stanislav Seletskiyfor Bitbucket Server 4.0.0 - 4.14.5 and more versions
    Versions available for Bitbucket Server 2.7.2 - 2.12.6
    Bitbucket Server 3.0.0 - 3.11.6
    This add-on isn't formally supported, but you can ask a question via Atlassian Answers.

    Ask a question

    This add-on isn't formally supported, but you can ask a question via Atlassian Answers.

    Ask a question

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

    There is no need to write repo hooks on Java anymore

    There is no need to write repo hooks on Java anymore

    Arbitary git commands can be used as executables

    Any arbitary executable can be used as hook

    Executables will fed with all data available

    In this example, it is very easy to create mirror hook to any other git repository (existing Mirror Extension provides mirroring only to Bitbucket Server instances).

    Also, shell scripts.

    Following data is accessible: positional parameters specified in configuration screen, ref pushed from/to and ref name, user who invokes push and all repo data (working directory will be changed to underlying git repo).

    More details

    Check out my other Atlassian helpers:

    The command specified in the configuration will be executed from repository dir, so it is possible to use any git command without any doubt.

    Keep in mind, that if you will print something in your Post-Receive Hook script, it will be silently discarded becase of Stash run Post-Receive Hooks asynchronously.

    User reviews

    Sign in to write a review
    by Cyril Cunin on 2016-08-03
    Simple, efficient, just what I needed for controlling commit content in pre-receive hook. A simple python script checks a regexp, and controls if mentioned Jira Issue exists (mandatory in our process). This plugin should be integrated by default in bitbucket, because with a basic git installation, this feature exists and I was afraid to loose it while migrating to bitbucket.
    2 out of 2 found this review helpful
    Was this review helpful?YesNo
    by Kumaran on 2016-05-30
    Does this add-on works on datacenter version of Bitbucket server ?
    Was this review helpful?YesNo
    by David Greene on 2016-03-04
    We'd really like to use this but we want to implement a Merge Check hook. Any plans to support Merge Check hooks in the future?
    Was this review helpful?YesNo
    by Aron Gombas on 2015-10-01
    This add-on is a brilliant example of the Unix philosophy: do something small, do that with superb quality, and be reusable. We use this in context with the Commit Policy Plugin, to verify Git commits against our commit policies managed in JIRA. It executes Python scripts without any error for several months, so I would not hesitate to use this in any other use case, either. This is also our official recommendation: http://www.midori-global.com/products/jira-commit-policy-plugin/documentation/git-with-stash Great work, Stanislav!
    Was this review helpful?YesNo
    Stanislav Seletskiy

    Thanks for valuable response!

    by Carl Myers on 2015-03-05
    This plugin does exactly what I need - in fact, I had invested a good hour or so in trying to write my own similar plugin before I realized it existed, and it is written just exactly the way I would have done it. Very high-quality, and you can go read the code yourself on github to ensure it meets your security expectations (it's short and easy to understand!). I'm really so happy I don't have to write this plugin - thanks so much for contributing this to open source!
    Was this review helpful?YesNo


    Basic support resources are available for this add-on.

    Vendor support resources


    Find out how this add-on works.

    Atlassian Community

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


    Version 3.3-1 Bitbucket Server 4.0.0 - 4.14.5 Released 2016-08-05


    Data Center support & additional environment variables


    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 External Hooks 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 External Hooks versions compatible with your instance, you can look through our version history page.

    Similar add-ons