File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,8 @@ exports.action = async function action() {
9898
9999async function actionIssue ( ) {
100100 console . info ( `Calling action on issue` ) ;
101+ console . log ( github . context ) ;
102+ return ;
101103 const { owner, repo, issueNumber, pullRequest } = await getActionParameters ( ) ;
102104
103105 const workflowRuns = await octokit . paginate (
@@ -124,12 +126,18 @@ async function actionIssue() {
124126 ? 1
125127 : 0
126128 ) ;
127- console . log (
128- "DEBUG SORTED RUNS" ,
129- reviewWorkflows . map ( ( { run_started_at } ) => run_started_at )
130- ) ;
131129 const latestRun = reviewWorkflows [ 0 ] ;
132- console . log ( "DEBUG LATEST RUN" , latestRun ) ;
130+ const { id : runId } = latestRun ;
131+ console . log ( `Triggering re-run on ${ runId } ` ) ;
132+
133+ await octokit . request (
134+ "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun" ,
135+ {
136+ owner,
137+ repo,
138+ run_id : runId ,
139+ }
140+ ) ;
133141}
134142
135143async function actionPullRequest ( ) {
You can’t perform that action at this time.
0 commit comments