-
Notifications
You must be signed in to change notification settings - Fork 588
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
Add Team Reviewers to Pull Request #4512
Conversation
|
||
const cache: { [key: string]: ITeam[] } = {}; | ||
const hasAllRepos = (await Promise.all(this._githubRepositories.map(async (repo) => { | ||
const key = `${repo.remote.owner}/${repo.remote.repositoryName}.json`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be name collisions with enterprise instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could only get a collision if there are two unrelated enterprises with the same owner + repo name combination. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the cache key makes no distinction between repo origins, yes, two unrelated enterprises might collide. But more importantly and likely would be a collision between github.com
repos and any enterprise.
Example:
github.com/microsoft/vscode
github.contoso.net/microsoft/vscode
While it may be unlikely that these examples exist and represent distinct teams, they are indeed two different sources of truth for information when querying/caching on the context microsoft/vscode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks. I'll update the key in another PR.
Moving this out, I hope for the last time. The reason I haven't merged it yet is that we're waiting to see if GitHub can provide a way to get team reviewers without adding the |
3acde33
to
649a2b7
Compare
Fixes #1126