-
Notifications
You must be signed in to change notification settings - Fork 12
Make the --github-auth flag work for extensions #48
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -295,7 +295,12 @@ export class WebClientServer { | |||||||||||
id: generateUuid(), | ||||||||||||
providerId: 'github', | ||||||||||||
accessToken: this._environmentService.args['github-auth'], | ||||||||||||
scopes: [['user:email'], ['repo']] | ||||||||||||
/** | ||||||||||||
* Add a set of scopes for the pull request extension which also wants | ||||||||||||
* read:user. | ||||||||||||
* @author coder | ||||||||||||
*/ | ||||||||||||
scopes: [['read:user', 'user:email', 'repo'], ['user:email'], ['repo']] | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ How come they have to be duplicated like this? I would think it would be enough to do:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, I thought so too but the scopes have to match exactly. So if an extension wants You can see here they do a strict equals on the scopes array: vscode/extensions/github-authentication/src/github.ts Lines 73 to 75 in 676edaa
It does feel like a bug so maybe we should patch this instead but idk. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AH...that make sense. Thanks for explaining. When we get to patches, I will see if it's a bug and we can raise upstream. |
||||||||||||
} : undefined; | ||||||||||||
|
||||||||||||
const locale = this._environmentService.args.locale || await getLocaleFromConfig(this._environmentService.argvResource); | ||||||||||||
|
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.
Was this intentional?
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.
Ah it kind of was intentional in that I did see my editor had done this but for some reason it did not occur to me to skip committing this. Gonna remove to not needlessly increase the patch size.
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.
Actually looks like it is our own comment so I will go ahead and leave it.