Skip to content

Commit

Permalink
Add execution state information (#499)
Browse files Browse the repository at this point in the history
* Add execution state information (#371)

* Type conformance to REST API (#371)

* Changed to get the job name (#371)
  • Loading branch information
8398a7 authored Jun 26, 2020
1 parent 7a1a0dd commit 2d47f7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/github/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export class Context {
workflow: string
action: string
actor: string
job: string
runNumber: number
runId: number

/**
* Hydrate the context from the environment
Expand All @@ -37,6 +40,9 @@ 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)
}

get issue(): {owner: string; repo: string; number: number} {
Expand Down

0 comments on commit 2d47f7b

Please sign in to comment.