How to add existing default reviewers when creating pull request with API?

We are using this API endpoint to set default reviewers for our repositories. It works as expected and corresponding settings appear at UI.


But when we create pull requests using this API endpoint, these default reviewers are not added implicitly.


Is that expected behaviour?

1 answer

0 vote
Dave Chevell Atlassian Team Aug 23, 2017

Hi Viet,

This is totally expected behaviour. Check out BSERV-9860, where one of the Bitbucket Server dev team responded to a similar request.
The tl;dr reason is that default reviewers are suggested, not enforced. Even when creating a PR via the UI, default reviewers can be removed before creating the pull request.

If you need to include them on PR's created via the API I'd recommend retrieving the default reviewers via this api so you can then include them when creating the PR.


Dave Chevell

@Dave ChevellIs this the endpoint you would suggest to access all default reviewers for a particular repo/source branch/target branch?


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

706 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