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

How to set default reviewers using API 2.0

Daniel Rosario Carletti March 6, 2020

Not sure if this is possible, but it seems it was once possible to set default reviewers using the API. Could not find it on the documentation. I'm trying to automate repository creation and setting the default reviewers is an important step. Has anyone tried and succeeded?

My request as of now (attempted to add a participants field, that of course didnt work):

curl -X POST \ https://api.bitbucket.org/2.0/repositories/myhandle/mynewrepo \ -H 'Authorization: Basic yattayattayatta' \ -H 'Content-Type: application/json' \ -d '{ "scm": "git", "is_private": true, "participants": [ { "is_staff": true, "account_id": "my_own_account", "role": [REVIEWER], "approved": true } ], "project": { "key": "MYPROJECT" }}'

 

1 answer

1 accepted

1 vote
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 7, 2020

Hello @Daniel Rosario Carletti,

Welcome to the Community.

Here are the endpoints to add and delete a user to/from default reviewers for a given repository. This endpoint lists all default reviewers.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events