This commit is contained in:
João Moreno
2020-07-16 12:48:33 +02:00
parent ef54e402e2
commit f3fed74a92

View File

@@ -34,10 +34,12 @@ let _octokit: Promise<Octokit> | undefined;
export function getOctokit(): Promise<Octokit> {
if (!_octokit) {
_octokit = getSession().then(session => {
_octokit = getSession().then(async session => {
const token = session.accessToken;
const agent = getAgent();
const { Octokit } = await import('@octokit/rest');
return new Octokit({
request: { agent },
userAgent: 'GitHub VSCode',