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

CODEOWNER's relation to "default reviewer" and its automation in PR created by API

Kyle Li April 18, 2024

1. About the relationship to existed defined "default reviewer", will CODEOWNER be an addon? or replacement?
2. When PR is created by calling https://api.bitbucket.org/2.0, will the "codeowner" be automatically added? the current "default reviewer" is not automatically added.

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2024

Hi Kyle,

Thank you for reaching out.

1. About the relationship to existed defined "default reviewer", will CODEOWNER be an addon? or replacement?

If user A is a default reviewer and user B is in the CODEOWNERS file for *.py files, then raising a PR where *.py files have changed is going to add both user A and user B to the reviewers.

Please keep in mind that these users are added as reviewers on the pull request creation page, and they are not enforced. The user who raises the PR can still manually remove reviewers that are added by Codeowners or by Default reviewers.

 

2. When PR is created by calling https://api.bitbucket.org/2.0, will the "codeowner" be automatically added? the current "default reviewer" is not automatically added.

Neither users in CODEOWNERS nor default reviewers will be added when creating a PR via API. If you use the API, you will need to explicitly specify reviewers in the API call. You can see an example here:

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events