Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Allow Github.com auth whengithub-enterprise.uri is set#7002

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alexr00 merged 3 commits intomicrosoft:mainfromdyhagho:fix/github-auth-coexist
Jun 23, 2025

Conversation

dyhagho
Copy link
Contributor

Problem

Since version0.110.0, setting the following configuration:

"github-enterprise.uri":"https://someghe.com"

causes the GitHub.com authentication flow to be skipped entirely. This results in:

  • No prompt to authenticate withgithub.com
  • Pull Request extension forGithub.com repos breaking silently

For many developers (including myself), contributing to bothgithub.com and a company-hosted GitHub Enterprise is common.

Even though the config can be setper workspace, it can be tedious to maintain across multiple repositories.
And, in practice, settinggithub-enterprise.uri in user settings makes more sense. But this intentionally disablesgithub.com functionality with the current logic.

What does change?

This PR updatesdoCreate so that GitHub.com is initialized even though the enterprise URI is configured.
This mirrors pre-0.110.0 behavior.

Before

before

After

after

@dyhaghodyhagho marked this pull request as draftJune 20, 2025 11:27
@dyhaghodyhagho marked this pull request as ready for reviewJune 20, 2025 11:27
@dyhagho
Copy link
ContributorAuthor

@alexr00 could I get a review? :)

Copy link
Member

@alexr00alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the PR! I understand the motivation, but I think we need one change.

@@ -221,6 +221,7 @@ export class CredentialStore extends Disposable {
}

private async doCreate(options: vscode.AuthenticationGetSessionOptions, additionalScopes: boolean = false): Promise<AuthResult> {
const github = await this.initialize(AuthProvider.github, options, additionalScopes ? SCOPES_WITH_ADDITIONAL : undefined, additionalScopes);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This will cause a badge to be shown on the Accounts menu, prompting for github.com auth, even when enterprise auth is successful. If enterprise auth has succeeded, theoptions should includesilent.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the feedback!

What do you think of this approach?

constgithubOptions={ ...options};if(enterprise&&!enterprise.canceled&&this.isAuthenticated(AuthProvider.githubEnterprise)){githubOptions.silent=true;}constgithub=awaitthis.initialize(AuthProvider.github,githubOptions,additionalScopes ?SCOPES_WITH_ADDITIONAL :undefined,additionalScopes);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't know that theisAuthenticated check is needed, but otherwise it looks good.

Copy link
Member

@alexr00alexr00 left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@dyhagho, sorry to hurry things along after you waited patiently, but it looks like we need this fix for#6971! I have pushed your proposed change.

dyhagho reacted with hooray emoji
@alexr00alexr00enabled auto-merge (squash)June 23, 2025 13:16
@vs-code-engineeringvs-code-engineeringbot added this to theJune 2025 milestoneJun 23, 2025
@alexr00
Copy link
Member

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@alexr00alexr00 merged commitad89f17 intomicrosoft:mainJun 23, 2025
3 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@TyriarTyriarTyriar approved these changes

@alexr00alexr00alexr00 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
June 2025
Development

Successfully merging this pull request may close these issues.

3 participants
@dyhagho@alexr00@Tyriar

[8]ページ先頭

©2009-2025 Movatter.jp