Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Jaakko Sipari June 3, 2015

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.

 

2 answers

5 votes
Harry Flink April 17, 2018

I'm having hard time with Pull Request created by me not allowing to set me as a reviewer.

An employee of mine screwed up a branch for a small feature, so I created another one and cherry-picked the proper commits.

I declined the pull request from the previous branch and now I want to create a new pull request with me as the reviewer and hoping to edit the original implementor to be owner of the pull request. Too bad if this is not possible because now I have to message him and manage it tomorrow.

I don't see any point limiting functionality of the Bitbucket artificially like this, it just doesn't make any sense.

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2015

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.

jason_s September 9, 2015

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.

Like # people like this
jaakkosipari September 10, 2015

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.

Deleted user May 19, 2018

I agree that this the pull request system should be workflow-agnostic.  I am in a similar situation where MANY people have contributed on a branch, so now we want everyone to review the branch holistically before it is merged back to the main branch.  Having Bitbucket try to guess how others will design their workflow for their needs is highly problematic.  It isn't for Bitbucket or Atlassian to decide what is appropriate. 

In short, the person who submits the PR is not necessarily the person that authored the code!  

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events