Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test team reviewers #4764

Closed
4 tasks done
alexr00 opened this issue Apr 24, 2023 · 4 comments
Closed
4 tasks done

Test team reviewers #4764

alexr00 opened this issue Apr 24, 2023 · 4 comments

Comments

@alexr00
Copy link
Member

alexr00 commented Apr 24, 2023

Refs: #1126

Complexity: 5

Create Issue


Background

You can have 2 kinds of reviewers on a GitHub PR: users and teams. We now newly support adding team reviewers to a PR from within the extension. There were two major issues to work around: we need additional auth scopes and getting team reviewers can be very slow.

Setup

If you work in a repo that uses team reviewers, then please verify this issue in that repo. Otherwise, you can use #3509 for adding and removing reviewers. The team you can use on #3509 is microsoft/github-pull-request-test.

To verify

Test with a repo that is part of an org:

  1. Open your repo and install the pre-release version of GitHub Pull Requests and Issues.
  2. Open the description/overview page of the PR you want to use for testing from the "Pull Requests" view.
  3. Start to add a reviewer by clicking on the gear next to "Reviewers"
  4. You should see a quick pick with user reviewers come up. Verify that you see a "teams" icon in the top right of the quick pick.
  5. Click on the "teams" icon to fetch team reviewers.
  6. Verify that you're prompted to auth.
  7. Complete the auth. Verify that after a few seconds you see a message in the quick pick about fetching team reviewers being slow.
  8. Verify that you eventually see team reviewers in the quick pick. Verify that icons are added for all possible reviewers to make it easy to distinguish between teams and users.
  9. Choose one of the team reviewers. Go to github.com and verify that the team reviewer was added.
  10. Reload
  11. Try to add a reviewer again. Verify that the team reviewers are cached and are already there without you having to wait for them.
  12. Remove the team reviewer. Go to github.com and verify that the team reviewer was removed.

Test with a repo that is not part of an org:

  1. Open your repo and install the pre-release version of GitHub Pull Requests and Issues.
  2. Open the description/overview page of the PR you want to use for testing from the "Pull Requests" view.
  3. Start to add a reviewer by clicking on the gear next to "Reviewers"
  4. You should see a quick pick with user reviewers come up. Verify that you do not see a "teams" icon in the top right of the quick pick.
@alexr00 alexr00 added this to the April 2023 milestone Apr 24, 2023
@karthiknadig
Copy link
Member

karthiknadig commented Apr 25, 2023

I am not able to pull up Overview page from the "pull request" view:
image

Clicking on the pull request title does nothing.

I see this error:
image

notificationsAlerts.ts:40 TypeError: Cannot read properties of undefined (reading 'title')
    at og.getTreeItem (c:\Users\kanadig\.vscode-insiders\extensions\github.vscode-pull-request-github-0.63.2023042509\dist\extension.js:1710:48743)
    at c:\Users\kanadig\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:65297
    at Array.map (<anonymous>)
    at y.R (c:\Users\kanadig\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:65262)
    at y.getChildren (c:\Users\kanadig\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:98:61563)
c @ notificationsAlerts.ts:40

@karthiknadig
Copy link
Member

Since I cannot bring up the PR page to select reviewers I am blocked.

@alexr00
Copy link
Member Author

alexr00 commented Apr 26, 2023

@karthiknadig I've fixed the error and the fix will be available in the next pre-release build, though I wouldn't expect that to cause the PR description to not show. Can you install the latest pre-release, repro the issue, then share the output of GitHub Pull Request?

@karthiknadig
Copy link
Member

@alexr00 Clicking this status item would not open the issue:
image

I had to un-install and re-install the same version, and it started working.

This worked fantastically for me now. Thanks.

@karthiknadig karthiknadig removed their assignment Apr 26, 2023
@meganrogge meganrogge removed their assignment Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants