2,116
Customers have installed this app in at least 2,116 active instances.
    by Stanislav Seletskiyfor Bitbucket Server 5.0.0 - 5.3.0 and more versions
    Versions available for Bitbucket Server 2.7.2 - 2.12.6
    Bitbucket Server 3.0.0 - 4.14.8
    UnsupportedData Center
    This app is compatible with the clustering and high-availability capabilities of our products.
    Get it nowFree app

    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

    (23)
    Sign in to write a review
    by Kirk Spragg on 2017-07-29
    This is great! We are a Python-centric dev shop and this allows me to write hooks in the language I know best.
    Was this review helpful?YesNo
    by Michael Rudd on 2017-06-22
    This plugin used to work great for us with Stash 3.11.1 and Git 1.9.5 We just upgraded to BitBucket 5.1.0 with Git 2.12.1 and the plugin stopped working. Took me a while to identify, what I think is maybe a problem. Git 2.11 "significant changes to push handling on the server" (ref. https://github.com/sford/yet-another-commit-checker/issues/139), more specifically "...The new quarantining behavior that was added for pushes creates a random temporary directory where the newly-received objects are written, and exports GIT_OBJECT_DIRECTORY , GIT_ALTERNATE_OBJECT_DIRECTORIES and GIT_QUARANTINE_PATH ..." Our custom pre-receive hook uses 'ls-tree' to examine the ${newrev} commit for improperly named files and folders, which would violate our directory structure policy. Now we're getting an error that it is not a tree object. Similarly, 'cat-file' errors out with "could not get object info", 'log' says "bad object" and diff says "invalid range". It all boils down to git not being able to see the ${newrev} object that the plugin passes to the script. I was trying to find a place to submit this bug report, but didn't find any links on the project's GitHub page. For now, it looks like we'd have to disable this hook, unfortunately :(
    Was this review helpful?YesNo
    by Jonas Andersson on 2017-06-07
    No reply for you guys, so here we go again. Is this plugin supported for bitbucket data center (4.13.0)?
    Was this review helpful?YesNo
    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 ?
    1 out of 1 found this review helpful
    Was this review helpful?YesNo

    Pricing

    Basic support resources are available for this app.

    Vendor support resources

    Documentation

    Find out how this app works.

    See existing Q&A in Atlassian CommunityAsk a question in the Atlassian Community

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

    Versions

    Version 3.4-1 Bitbucket Server 5.0.0 - 5.3.0 Released 2017-06-13

    Summary

    Add STASH_IS_DRY_RUN environment variable

    Details

    https://github.com/seletskiy/atlassian-external-hooks/pull/1

    Installation

    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 app versions compatible with your Bitbucket instance.
    5. Click Install to download and install your app.
    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 apps