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

Some teams do not show up as potential reviewers #5183

Closed
curtisgibby opened this issue Aug 17, 2023 · 2 comments
Closed

Some teams do not show up as potential reviewers #5183

curtisgibby opened this issue Aug 17, 2023 · 2 comments

Comments

@curtisgibby
Copy link
Contributor

curtisgibby commented Aug 17, 2023

  • Extension version: Both the current release version (v0.70.0) as well as the latest pre-release (2023-8-17, 03:17:44)
  • VSCode Version: 1.81.1 (user setup)
  • OS: Windows_NT x64 10.0.19044

Steps to Reproduce:

  1. Attempt to add my team as a reviewer on a PR.
  2. Feel sad when my team doesn't show up in the list

I love the functionality added in #1126. I have one issue with it. When I attempt to add my own team as a reviewer on any PR, that team doesn't show up in the quick pick list. (In my case, the team I'm trying to add is called breadwinners-BE.) Dozens of other teams show up, as well as the individual people, but not my team. 😞

extension reviewers

This team does correctly show up on the PR screen on Github.com.

github com reviewers

As we discussed previously, my org has a large number of teams. I wonder if the query that you're making to the GH API only returns the first 100 teams, and the team that I'm looking for isn't included in that group. (This makes some sense to me, because this team is one of the newer ones in our org.)

If that's the case, I imagine that the fix would be to ask the API to increase the number of entries returned in a single call, or to make multiple calls to the API.

If it's not related to API response limits, I wonder if there's something special about my team that makes it get filtered out of the query that you're making. Are there any special attributes that a team has to have in order to show up in that API response?

@alexr00
Copy link
Member

alexr00 commented Aug 18, 2023

@curtisgibby, first, thank you for filing issues and helping make the extension better.

We are not limiting to the fist 100 teams, in fact we should be fetching all of them (for better or worse). The way we have to fetch teams though is painful:

  • First, we have to fetch all teams for the org. This can be hundreds of teams and can take a while.
  • Then, we locally filter the teams down to just those teams that have access to the repository that you have open.
    These steps can be so slow that by default we only use cached team results. I think this could be what you're hitting.

On the "Add a reviewer" quick pick, there should be a little button in the top right to "Show or refresh team reviewers". If you use that, then wait (possibly minutes) does your team show up?

I've provided feedback to GitHub that this isn't a sensible way to get teams.

@curtisgibby
Copy link
Contributor Author

The refresh button correctly pulled in my team. Woo hoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants