diff --git a/src/commands/draft/draftCommands.ts b/src/commands/draft/draftCommands.ts index 5423d3d74..800a6110b 100644 --- a/src/commands/draft/draftCommands.ts +++ b/src/commands/draft/draftCommands.ts @@ -214,8 +214,9 @@ type DraftDependencies = { async function getGitHubAuthenticationSession(): Promise> { try { - // No special scopes are required for GitHub - we are just listing repositories/branches. - const scopes: string[] = []; + // Repo scope required to see public/private repos. + // Reference for Github scopes: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps + const scopes: string[] = ["repo"]; const session = await authentication.getSession("github", scopes, { createIfNone: true }); return { succeeded: true, result: session }; } catch (e) { @@ -229,13 +230,12 @@ async function getRepo(octokit: Octokit, remote: Remote): Promise