Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-22426

Default reviewers API shows users even after their access is revoked

    XMLWordPrintable

Details

    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

      1. Add one user to the default reviewers list
      2. Revoke the user's access
      3. 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lmontiel@atlassian.com Leonardo M
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: