Customers have installed this add-on in at least 1,071 active instances.
    by Tomas Bjerrefor Bitbucket Server 4.0.0 - 4.12.1 and more versions
    Versions available for Bitbucket Server 2.12.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

    Notify other systems about events regarding pull requests in Bitbucket Server

    Notify other systems about events regarding pull requests in Bitbucket Server


    Different URL:s for different filters

    Custom buttons in pull request view

    Highly configurable URL:s with variables. You ca, for example, trigger Jenkins like this

    http://server/job/name/buildWithParameters?token=T&FROM_REPO= ${PULL_REQUEST_FROM_REPO_NAME} &TO_REPO= ${PULL_REQUEST_TO_REPO_NAME}

    Each notification has 2 fields to construct a filter. The filter has a text field and a regexp. When the regexp matches the text, the notification is triggered. Use any variable(s) to construct text to match on.

    It can add buttons to the pull request view in Bitbucket. And bind them to notifications. To for example trigger a build manually.

    A pressed button will fire a BUTTON_TRIGGER -event.

    More details

    • Trigger on one, or several, event(s) regarding pull requests including source branch change and target branch change.
    • Add custom buttons to pull request view in Bitbucket Server.
    • Invoke one, or several, URL(s) when event(s) are triggered.
      • Optionally with "HTTP Basic Authentication" headers.
      • Completely custom URL supporting variables, including but ot limited to:
        • ${PULL_REQUEST_ID} Example: 1
        • ${PULL_REQUEST_VERSION} Example: 1
        • ${PULL_REQUEST_AUTHOR_ID} Example: 1
        • ${PULL_REQUEST_FROM_HASH} Example: 6053...
        • ${PULL_REQUEST_FROM_ID} Example: refs/heads/branch
        • ${PULL_REQUEST_FROM_REPO_ID} Example: 1
        • ${PULL_REQUEST_FROM_REPO_SLUG} Example: rep_1
        • ...

    More details on GitHub and this blog post.

    User reviews

    Sign in to write a review »
    by Ali Hesson on 2017-01-06
    Can this plug-in be used to trigger builds when new commits are made to the Pull Requests? If we are using Jenkins, how does it differ than the Webhook to Jenkins for Bitbucket plug-in?
    Was this review helpful?YesNo

    Tomas Bjerre

    Yes it can trigger builds in Jenkins when new commits are made to pull requests.

    To do a correct verification you should trigger on changes to the target branch, and the source branch. And you should merge source into target before compiling and running tests. This plugin can provide the information needed to do that. And not only in Jenkins. People are using it with Bamboo and TeamCity as well.

    It is well documented at Github so you should find your answers there: https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket

    by Kashyap Parikh on 2016-11-22
    Very useful to integrate several hundred repos with distributed CI systems. Tomas is very responsive. We have had issues upgrading the plugin from 1.x to 2.x while upgrading underlying Stash from 3.x to Bitbucket 4.x and Tomas provided quick fixes in succession to make the upgrade work. I wish Atlassian change the plugin from UNSUPPORTED to SUPPORTED. So far I haven's seen any other plugin that provide similar functionality and Bitbucket doesn't provide these features out of box.
    Was this review helpful?YesNo
    by automatit on 2016-07-15
    Hi, I Just download this plugin with Bitbucket 4.7.1 When trying to trasfer parameters to jenkins (2.1) i'm getting nothing. e.g. "The URL to invoke when notification is triggered" - https://<my Jenkins url>/job/eventhubutils_Build_mvn/buildWithParameters?FROM_REPO=${PULL_REQUEST_FROM_REPO_NAME}&TO_REPO=${PULL_REQUEST_TO_REPO_NAME}&PULL_REQUEST_USER_DISPLAY_NAME=${PULL_REQUEST_USER_DISPLAY_NAME}&EVERYTHING_URL=${EVERYTHING_URL} Can you advise? EDIT: the 'Build with Parameters' started but all the parameters are blank. (Bitbucket server is Windows and Jenkins is Linux)
    Was this review helpful?YesNo

    Tomas Bjerre

    You should open an issue about that on GitHub, https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket.

    It would help if you supplied the tesponse of this:

    curl -u admin:admin 'http://localhost:7990/bitbucket/rest/prnfb-admin/1.0/settings/notifications' -H 'Content-Type: application/json; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01'

    Edit: How do you know that no values are supplied? Were you able to view some logs or something to determine if they are there or not?

    by Itay Neeman on 2015-12-17
    This plugin elevated our ability to use Bitbucket Server (and Stash before it) to a whole new level - we're able to do all kinds of new workflows with Jenkins and other tools which weren't possible previously. The support is also phenomenal, and Tomas is very quick to add new requested features.
    Was this review helpful?YesNo
    by Shahnaz Afroz on 2015-12-08
    Using 1.37 to trigger multiple build jobs from different repos. Very impressed with this plugin and its performance. Unfortunately, we are seeing some unexplained behaviors. The trigger works most of the time: 8 out of 10 for us. It is not clear why the 20% failure occurs. The filter is simple. Filter string: ${PULL_REQUEST_TO_SSH_CLONE_URL} Filter regexp: ssh://git@xxxxxxx-stash.global.yyyyy.net:7999/abcd/efgh.git It is only supposed to trigger when (1) there is no conflict, and (2) the pull request is OPEN or REOPEN. We use a jenkins job URL with parameters to build the component via http POST option. Http header fields are empty, so is the POST content field. Any help will be greatly appreciated on this issue. One other feedback I have is, I don't seem to be able to choose which buttons should appear on which repo. For example, we have numerous repos on Stash. But we want only a handful of them to have "Trigger Build" button. Can not seem to find a way to do so. For some repos, we may want to display "Build and Deploy" button while for others, it might be "Build-Deploy-Test".
    Was this review helpful?YesNo

    Tomas Bjerre

    To add a "Build and Deploy" button for a specific repo, and only for that repo:

    1. Add the button and name it "Build and Deploy"

    2. Add a trigger


    4. filter regexp: name of repo, like "rep_1-Build and Deploy"

    5. Configure the URL and anything else you want to occur when button is pressed.

    And about the 20% loss. I have not heard anyone saying that before. The dots and slashes will need escaping in your regexp, I think =) Perhaps you dont need the entire clone URL as filter text? Perhaps you can do it with just ${PULL_REQUEST_FROM_REPO_NAME} and a less complex regexp.



    Pull Request Notifier for Bitbucket isn't formally supported.


    Version 2.48 Bitbucket Server 4.0.0 - 4.12.1 Released 2017-01-13


    NEEDS_WORK and UNAPPROVED variables


    NEEDS_WORK and UNAPPROVED 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 Pull Request Notifier for Bitbucket 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 Pull Request Notifier for Bitbucket versions compatible with your instance, you can look through our version history page.

    Similar add-ons