File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { getInput , getBooleanInput , info , setFailed } from "@actions/core" ;
22import { exec } from "@actions/exec" ;
3+ import { context as githubContext } from '@actions/github' ;
34import { downloadTool } from "@actions/tool-cache" ;
45import { readFileSync , chmodSync } from "fs" ;
56
@@ -40,6 +41,13 @@ function getConfig(): Config {
4041 const githubToken : string = getInput ( "github-token" , {
4142 required : true ,
4243 } ) ;
44+ process . env [ "GITHUB_TOKEN" ] = githubToken ;
45+
46+ const issueNumber = githubContext . issue . number
47+ if ( issueNumber ) {
48+ process . env [ 'GITHUB_ISSUE_ID' ] = String ( issueNumber )
49+ }
50+
4351
4452 const repo = process . env [ "GITHUB_REPOSITORY" ] ;
4553 if ( repo === undefined ) {
@@ -189,8 +197,8 @@ async function run(): Promise<void> {
189197 ${ waitArgsString } ; then
190198 exit 3;
191199 fi
192-
193-
200+
201+
194202 # check status, exit with non-zero status if failed or stopped
195203 status=$(${ cli } --verbosity ${ config . verbosity } show \
196204 --owner ${ config . owner } \
You can’t perform that action at this time.
0 commit comments