File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,16 @@ export class Credentials {
4747 return new Credentials ( new Octokit . Octokit ( { auth : overrideToken , retry } ) ) ;
4848 }
4949
50- private async createOctokit ( ) : Promise < Octokit . Octokit > {
50+ /**
51+ * Creates or returns an instance of Octokit.
52+ *
53+ * @returns An instance of Octokit.
54+ */
55+ async getOctokit ( ) : Promise < Octokit . Octokit > {
56+ if ( this . octokit ) {
57+ return this . octokit ;
58+ }
59+
5160 const session = await vscode . authentication . getSession (
5261 GITHUB_AUTH_PROVIDER_ID ,
5362 SCOPES ,
@@ -59,16 +68,4 @@ export class Credentials {
5968 retry,
6069 } ) ;
6170 }
62-
63- /**
64- * Creates or returns an instance of Octokit.
65- *
66- * @returns An instance of Octokit.
67- */
68- async getOctokit ( ) : Promise < Octokit . Octokit > {
69- if ( this . octokit ) {
70- return this . octokit ;
71- }
72- return await this . createOctokit ( ) ;
73- }
7471}
You can’t perform that action at this time.
0 commit comments