mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
GitHub - do not clear branch protection if the user is not signed in (#187588)
This commit is contained in:
parent
f8782370c9
commit
dca0fc0fd7
|
@ -204,12 +204,14 @@ export class GithubBranchProtectionProvider implements BranchProtectionProvider
|
|||
|
||||
if (err instanceof AuthenticationError) {
|
||||
// A GitHub authentication session could be missing if the user has not yet
|
||||
// signed in with their GitHub account or they have signed out. In this case
|
||||
// we have to clear the branch protection information.
|
||||
this.branchProtection = branchProtection;
|
||||
this._onDidChangeBranchProtection.fire(this.repository.rootUri);
|
||||
// signed in with their GitHub account or they have signed out. If there is
|
||||
// branch protection information we have to clear it.
|
||||
if (this.branchProtection.length !== 0) {
|
||||
this.branchProtection = branchProtection;
|
||||
this._onDidChangeBranchProtection.fire(this.repository.rootUri);
|
||||
|
||||
await this.globalState.update(this.globalStateKey, undefined);
|
||||
await this.globalState.update(this.globalStateKey, undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue