diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index 4eb7054310..d3f65f7add 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -18,6 +18,9 @@ export class Context { job: string runNumber: number runId: number + apiUrl: string + serverUrl: string + graphqlUrl: string /** * Hydrate the context from the environment @@ -43,6 +46,10 @@ export class Context { this.job = process.env.GITHUB_JOB as string this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10) this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10) + this.apiUrl = process.env.GITHUB_API_URL ?? `https://api.github.com` + this.serverUrl = process.env.GITHUB_SERVER_URL ?? `https://github.com` + this.graphqlUrl = + process.env.GITHUB_GRAPHQL_URL ?? `https://api.github.com/graphql` } get issue(): {owner: string; repo: string; number: number} {