From f94a85940b6d706c50b02c596a0674df950e725d Mon Sep 17 00:00:00 2001 From: 839 <8398a7@gmail.com> Date: Sun, 14 Jun 2020 14:53:53 +0900 Subject: [PATCH 1/3] Add execution state information (#371) --- packages/github/src/context.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index 21f14c9c09..3c248e3961 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -15,6 +15,8 @@ export class Context { workflow: string action: string actor: string + runNumber: string + runId: string /** * Hydrate the context from the environment @@ -37,6 +39,8 @@ export class Context { this.workflow = process.env.GITHUB_WORKFLOW as string this.action = process.env.GITHUB_ACTION as string this.actor = process.env.GITHUB_ACTOR as string + this.runNumber = process.env.GITHUB_RUN_NUMBER as string + this.runId = process.env.GITHUB_RUN_ID as string } get issue(): {owner: string; repo: string; number: number} { From 728bcb5e37f92f5dd9e370bd3a67781f94992b3a Mon Sep 17 00:00:00 2001 From: 839 <8398a7@gmail.com> Date: Sat, 20 Jun 2020 13:27:00 +0900 Subject: [PATCH 2/3] Type conformance to REST API (#371) refs: https://developer.github.com/v3/actions/workflow-runs/#list-workflow-runs --- packages/github/src/context.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index 3c248e3961..5b02b182d3 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -15,8 +15,8 @@ export class Context { workflow: string action: string actor: string - runNumber: string - runId: string + runNumber: number + runId: number /** * Hydrate the context from the environment @@ -39,8 +39,8 @@ export class Context { this.workflow = process.env.GITHUB_WORKFLOW as string this.action = process.env.GITHUB_ACTION as string this.actor = process.env.GITHUB_ACTOR as string - this.runNumber = process.env.GITHUB_RUN_NUMBER as string - this.runId = process.env.GITHUB_RUN_ID as string + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10) + this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10) } get issue(): {owner: string; repo: string; number: number} { From 5e4b1f17de1d1b6ec2dfe9def630e7e005ac8a2b Mon Sep 17 00:00:00 2001 From: 839 <8398a7@gmail.com> Date: Fri, 26 Jun 2020 08:22:22 +0900 Subject: [PATCH 3/3] Changed to get the job name (#371) --- 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 5b02b182d3..52efabb068 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -15,6 +15,7 @@ export class Context { workflow: string action: string actor: string + job: string runNumber: number runId: number @@ -39,6 +40,7 @@ export class Context { this.workflow = process.env.GITHUB_WORKFLOW as string this.action = process.env.GITHUB_ACTION as string 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.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10) }