GitHub - clear branch protection when signing out (#182053)

This commit is contained in:
Ladislau Szomoru
2023-05-10 15:16:56 +02:00
committed by GitHub
parent 45b57b3137
commit 4182ec739b
2 changed files with 29 additions and 24 deletions

View File

@@ -59,10 +59,10 @@ export function getOctokit(): Promise<Octokit> {
let _octokitGraphql: Promise<graphql> | undefined;
export async function getOctokitGraphql(): Promise<graphql> {
export async function getOctokitGraphql(silent = false): Promise<graphql> {
if (!_octokitGraphql) {
try {
const session = await authentication.getSession('github', scopes, { createIfNone: false });
const session = await authentication.getSession('github', scopes, { silent });
if (!session) {
throw new AuthenticationError('No GitHub authentication session available.');