Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
Severity 3 - Minor
-
310
-
5
-
Description
Issue Summary
When using the default reviewers endpoint (https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-default-reviewers-get) to get a list of the default reviewers from a given repository, deleted/revoked access users will still be listed.
Steps to Reproduce
- Add one user to the default reviewers list
- Revoke the user's access
- Perform an API request against the following endpoint
GET /2.0/repositories/{workspace}/{repo_slug}/default-reviewers
The user that you revoked the access from will still be on the list of users.
Expected Results
When user accesses are revoked, the user is no longer a default reviewer. Therefore, the user should not be listed as a default reviewer on the API.
Actual Results
The deleted users are still listed on the default-reviewers API.
Workaround
Use the effective reviewers list endpoint, which should show all users from the repository default reviewers as well as the users set in the project level permissions:
If you are looking for the default reviewers of the repository only, you can identify them by checking the "reviewer_type" attribute in the JSON payload of the endpoint above.
If its value is "repository", then it's a repository-level reviewer.