How can I allow adding myself as a pull request reviewer?

It seems to be prevented by default for clear reasons, but we require this for what I believe to be a common scenario:

  • All code needs to be reviewed by someone else than the author
  • More than one person can commit to a branch/PR
  • If two people author code to a branch, it should be enough for those same two people to review/approve the PR. This way all code is reviewed by at least one person other than the author.

Enabling a workflow described above requires two things from Stash:

  • Set minimum required amount of approvers for the repoitory to 2 persons (already works!)
  • Allow the creator of the PR to be added as a reviewer (currently prevented by Stash)

The "downside" would be that the author of a PR would always need to approve the branch, despite the branch containing commits from a single author. This is really just a minor annoyance, though, as it solves a much bigger problem.

 

1 answer

There is no way to set the author to be one of the reviewers. If you really want to achieve what you described, the only way to do it is to have a third user create the PR (and probably unwatch it immediately) and set the two authors to be the reviewers.

That said, I do not agree with you on your third point. If two people collaborate on a feature, it really should be reviewed by a third person who did not write any of the code and comes with a fresh pair of eyes.

No, that's a particular type of workflow. If you want Stash to be workflow-agnostic, allow anyone as a reviewer who has proper permissions, *including* the author.

And we are still only talking about the person who created the PR, *not* the person/people who authored the code. The current restriction is merely a "suggestion" and doesn't enforce anything. It just makes life harder for other workflows. Hence the restriction should be optional. A nice additional option would be to prevent commit authors from approving the PR.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

673 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot