Bitbucket Reviewer Groups

Just add some tags in our PR and we'll take care of the rest


Installation

Once you've installed the plugin in your Bitbucket instance, just create a reviewers.yml at the root of your repository in your default branch (normally "master").

You can download a template here


Reviewers

            
ui:
  trigger:
    regex: ".*/ui/.*"
  max: 2
  members:
    - rachael
    - arthur
    - clark
    - mary
techLead:
  trigger:
    regex: ".*\.gradle"
    numberOfFilesChanged: 30
  members:
    - julie
    - graham
copywriter:
  members:
    - fred
    - lucas
founder:
  max: 1
  trigger:
    numberOfFilesChanged: 50
  members:
    - scott
    - michael
        
        

Understanding this file

Let's take a look about how each single group will work:

  • ui: Every time a file inside any folder with the name `ui` is changed, 2 randomly selected reviewers from this group wil be added to the pull request.
  • techLead: If the pull request contains a change in a file with the `.gradle` extension OR the number of changed files is greater or equal than 30, all the tech leads will be added to this PR
  • copywriter: Fred and Lucas will only be added as reviewers if someone manually selects them or comment on the PR the hashtag `#copywriter`. This manual selection actually can be done to every single group.
  • founder: If a single Pull request is changing more than 50 files, one of the founders will be randomly selected as a reviewer.


Adding groups to a Pull Request

Well, for a start every group that activated a trigger rule will be automatically added.

But if you have some group in mind that you want to add you can just type "#group-name" either in the PR description or later on in a comment. So adding a group is as easy as commenting "This need to be looked up by #designer"

If you are not sure about what group to bring in, you can just pick it from the interface