Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-9253

Add Pull Request setting to block a merge if a Pull Request "Needs Work"

    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      There are a number of Pull Request settings already to manage various requirements in order to merge a PR, but there is not a setting to control whether or not a PR can be merged if it is flagged as "Needs Work"

      The description that's displayed if you hover over the "Needs Work" button says "Needs Work. This pull request shouldn't be merged yet", but there is no setting to actually enforce this behavior.

      It would be great if this option was added to the standard Pull Request settings.

          Form Name

            [BSERV-9253] Add Pull Request setting to block a merge if a Pull Request "Needs Work"

            This should be a setting in the product, not an add-on. As Sukumar above notes, it's an extra hassle/bunch of process etc to get an add-on installed in any actual corporation, and it's a trivial change.

            Of course, listening to your customers/users isn't super high on your capabilities list. At least as not as high as writing haikus is.

            timothy.clark added a comment - This should be a setting in the product, not an add-on. As Sukumar above notes, it's an extra hassle/bunch of process etc to get an add-on installed in any actual corporation, and it's a trivial change. Of course, listening to your customers/users isn't super high on your capabilities list. At least as not as high as writing haikus is.

            Jack Koppa added a comment -

            Thanks so much, Zafer! Let me know if there's anything I can do on our instance to help debug

            Jack Koppa added a comment - Thanks so much, Zafer! Let me know if there's anything I can do on our instance to help debug

            @Jack Koppa, I'll check v6.4.0 and let you know.

             

            Best regards

            Zafer Cakmak added a comment - @Jack Koppa, I'll check v6.4.0 and let you know.   Best regards

            Jack Koppa added a comment -

            Do you know if the plugin is intended to work on v6.4.0?

            Jack Koppa added a comment - Do you know if the plugin is intended to work on v6.4.0?

            Jack Koppa added a comment -

            Hi Zafer - thanks so much for publishing the free add-on. That functionality is exactly what we're looking for.

            We had previously used this plugin when we were on v5.8.0: **https://marketplace.atlassian.com/apps/1218855/needs-work-merge-check-for-bitbucket/version-history

            After upgrading to 6.4.0, however, we needed the same functionality and the above plugin does not support v6+.

            So we tried out yours, but I'm seeing errors whenever I enable it on a repository.

            I can't currently figure out how to upload screenshots, but I'm seeing "Repository hook com.kodgemisi.plugins.bitbucket.prevent-when-needs-work:needs-work-merge-hook failed" when I click the Merge button to see why it's disabled

            In other cases, I see simply "java.lang.NullPointerException"

             

             

            Jack Koppa added a comment - Hi Zafer - thanks so much for publishing the free add-on. That functionality is exactly what we're looking for. We had previously used this plugin when we were on v5.8.0: ** https://marketplace.atlassian.com/apps/1218855/needs-work-merge-check-for-bitbucket/version-history After upgrading to 6.4.0, however, we needed the same functionality and the above plugin does not support v6+. So we tried out yours, but I'm seeing errors whenever I enable it on a repository. I can't currently figure out how to upload screenshots, but I'm seeing "Repository hook com.kodgemisi.plugins.bitbucket.prevent-when-needs-work:needs-work-merge-hook failed" when I click the Merge button to see why it's disabled In other cases, I see simply "java.lang.NullPointerException"    

            Why do I need to chase my admin to install an add-on for this very basic functionality.

            All we're asking for is the option to prevent merges when someone marks a PR w/ Needs Work - via a merge check.  This is not a complicated ask and should not be a stretch!

            Sukumar Mehta added a comment - Why do I need to chase my admin to install an add-on for this very basic functionality. All we're asking for is the option to prevent merges when someone marks a PR w/ Needs Work - via a merge check.  This is not a complicated ask and should not be a stretch!

            Hi all,

            we've created and published a free add-on to solve these problem. We also optionally remove approval if developer updates PR.

            You can find add-on on the link below:

            https://marketplace.atlassian.com/apps/1219882/prevent-merge-when-needs-work?hosting=server&tab=overview

             

            Best Regards,

            Zafer Cakmak

            Zafer Cakmak added a comment - Hi all, we've created and published a free add-on to solve these problem. We also optionally remove approval if developer updates PR. You can find add-on on the link below: https://marketplace.atlassian.com/apps/1219882/prevent-merge-when-needs-work?hosting=server&tab=overview   Best Regards, Zafer Cakmak

            Hi,

            Our Control Freak add-on can block PR's with "needs-work" reviews.  It's pretty flexible:  you can choose which branches to apply this policy against, and you can ignore drive-by "needs-work" reviews (from read-only users - especially handy for public repositories where anyone in your entire company could mark something "needs-work" even if they have nothing to do with the repository).

            In addition, our PR-Booster add-on (paid) is able to retain "needs-work" reviews whenever a pull-request (PR) receives new pushes.

            By combining these two add-ons you can setup a pretty solid policy.  Basically makes your pull-request process behave a lot closer to Gerrit, with "needs work" becoming the equivalent of a -2 review in Gerrit.

             

            Here's some screenshots:

            Control-Freak config screen

            PR-Booster config screen

             

            Regards,

            Sylvie Davies
            Founder and Software Engineer, bit-booster.com

             

             

             

            Julius Davies [bit-booster.com] added a comment - Hi, Our Control Freak add-on can block PR's with "needs-work" reviews.  It's pretty flexible:  you can choose which branches to apply this policy against, and you can ignore drive-by "needs-work" reviews (from read-only users - especially handy for public repositories where anyone in your entire company could mark something "needs-work" even if they have nothing to do with the repository). In addition, our PR-Booster add-on (paid) is able to retain "needs-work" reviews whenever a pull-request (PR) receives new pushes. By combining these two add-ons you can setup a pretty solid policy.  Basically makes your pull-request process behave a lot closer to Gerrit, with "needs work" becoming the equivalent of a -2 review in Gerrit.   Here's some screenshots: Control-Freak config screen PR-Booster config screen   Regards, Sylvie Davies Founder and Software Engineer, bit-booster.com      

            Svante,

            I recently discovered this suggestion when we ran into a similar workflow problem. Have you had a chance you publish the source code? I haven't seen it anywhere. 

            John

            John Neville added a comment - Svante, I recently discovered this suggestion when we ran into a similar workflow problem. Have you had a chance you publish the source code? I haven't seen it anywhere.  John

            Yes, I will publish the code shortly.

            Svante Gustafsson added a comment - Yes, I will publish the code shortly.

              khughes@atlassian.com Kristy
              ccd07a9f3b6d Chris Albrecht
              Votes:
              51 Vote for this issue
              Watchers:
              42 Start watching this issue

                Created:
                Updated:
                Resolved: