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

Default reviewers are still listed after being removed from workspace

XMLWordPrintable

      This bug was closed and the impact for this issue should be tracked on: https://jira.atlassian.com/browse/BCLOUD-23439

      Issue Summary

      • When a user is removed from a workspace, if the user was listed as a default reviewer for any repository, the default-reviewers endpoint still returns that user, even though they no longer have access to the workspace;

      Steps to Reproduce

      1. Add a user to your workspace;
      2. Add the user as default reviewer for any repository;
      3. Remove the user through the workspace's settings > User directory
      4. Use the default-reviewers API endpoint for that repository;

      Expected Results

      • The user should not be listed as a default reviewer anymore;

      Actual Results

      • The user appears in the list of repository default reviewers through the API;
      • Furthermore, if you try to edit a file and commit it through the UI, creating a Pull Request, the user will be added as a reviewer, causing an issue while trying to create the PR.

      The below exception is thrown in the network tab of the Developer Panel:

      {
          "type": "error",
          "error": {
              "message": "reviewers: John Doe is not a member of this workspace and cannot be added to this pull request",
              "fields": {
                  "reviewers": [
                      "John Doe is not a member of this workspace and cannot be added to this pull request"
                  ]
              }
          }
      }
      

      Workaround

      • Use the Delete Default Reviewer Endpoint to remove that user from the list of default reviewer;
        $ Curl -X DELETE -u <username>:<password> "https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/default-reviewers/%7B<UUID>%7D"
        

              dsborets@atlassian.com Denis Sborets
              0298b2749e0b Mateus T
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: