From 3ceed57c65d1f90e59cee0885b6fb1a7c7181af6 Mon Sep 17 00:00:00 2001 From: Holden Whitehead <28017008+HW13@users.noreply.github.com> Date: Mon, 27 Mar 2023 13:36:51 -0700 Subject: [PATCH] feat: add runAttempt to Context --- packages/github/src/context.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index d3f65f7a..68bfdd4f 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -17,6 +17,7 @@ export class Context { actor: string job: string runNumber: number + runAttempt: number runId: number apiUrl: string serverUrl: string @@ -45,6 +46,7 @@ export class Context { this.actor = process.env.GITHUB_ACTOR as string this.job = process.env.GITHUB_JOB as string this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10) + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT 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`