929
Customers have installed this add-on in at least 929 active instances.
    by Tomas Bjerrefor Bitbucket Server 4.0.0 - 4.11.2 and more versions
    Versions available for Bitbucket Server 2.12.0 - 3.11.6
    Unsupported
    This add-on isn't formally supported, but you can ask a question via Atlassian Answers.

    Ask a question

    Unsupported
    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

    Variables

    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 Stash
    • 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_PROJECT_ID} Example: 1
        • ${PULL_REQUEST_FROM_REPO_PROJECT_KEY} Example: PROJECT_1
        • ${PULL_REQUEST_FROM_REPO_SLUG} Example: rep_1
        • ...

    You can have several notifications and have them trigger different URL:s. The filtering functionality is highly configurable. Create a string with the variables and then a regexp that should match that string.

    User reviews

    (17)
    Sign in to write a review »
    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

    3. filter text: ${PULL_REQUEST_FROM_REPO_NAME}-${BUTTON_TRIGGER_TITLE}

    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.

    by Timothy Harris on 2015-10-13
    Installed 1.30. Pretty much works except I cannot seem to get it to show the build Trigger button. No matter what I do. I want to put branch restriction on the master branch. Only Jenkins Build user can merge into master. Require one approval in stash. Once the pull request is approved I want to be able to hit the trigger button(Integrate) and have Jenkins merge, build and push merge on success. Kinda hard to do without the trigger button :-)
    Was this review helpful?YesNo

    Tomas Bjerre

    Thanks for the review =)

    Latest compatible with 3.9.2 is 1.30.

    But its only available here:

    https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/releases

    If I publish it in Atlassian Marketplace it will be shown as the latest version, and I want 2.4 to be the latest version.

    Edit 151013:

    The simplest way of just adding a button may be to:

    • Write sumthing under "Trigger button"
    • Click "Everyone" under "Show button for
    • Save the button!
    • Check "BUTTON_TRIGGER"
    • Enter a URL to invoke
    • Save the notification!

    I just released 1.32 here:https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/releases/tag/pull-request-notifier-for-stash-1.3With it you can set filter string to:${PULL_REQUEST_PARTICIPANTS_APPROVED_COUNT}And filter regexp to:[^0]And it will trigger only if there are non-zero number of participants that approved the PR.

    Pricing

    Support

    Pull Request Notifier for Bitbucket isn't formally supported.

    Versions

    Version 2.41 Bitbucket Server 4.0.0 - 4.11.2 Released 2016-11-23

    Summary

    New variables PULL_REQUEST_REVIEWERS_EMAIL / PULL_REQUEST_PARTICIPANTS_EMAIL

    Details

    New variables:

    • PULL_REQUEST_REVIEWERS_EMAIL
    • PULL_REQUEST_PARTICIPANTS_EMAIL

    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 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