Skip to content

Commit f3bb2d8

Browse files
committed
Fix
1 parent 8a12918 commit f3bb2d8

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/reports-group/attach-check-run-to-triggering-workflow-action/src/main.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ const {GITHUB_REPOSITORY} = process.env;
88
*/
99
function guessPrNumber() {
1010
if ('pull_request' === github.context.eventName) {
11-
return github.context.payload.number
12-
}
13-
if ('workflow_run' === github.context.eventName) {
14-
return 'pull_request' === github.context.payload.workflow_run.event
15-
? github.context.payload.pull_requests[0]?.number
16-
: undefined
17-
;
11+
return github.context.payload.number;
12+
} else if ('workflow_run' === github.context.eventName && 'pull_request' === github.context.payload.workflow_run.event) {
13+
return github.context.payload.pull_requests[0]?.number;
1814
}
1915

2016
return undefined;
@@ -53,7 +49,7 @@ function guessTriggeringWorkflowName() {
5349
*/
5450
function guessRunId() {
5551
if ('workflow_run' === github.context.eventName) {
56-
return github.context.payload.id.toString();
52+
return github.context.payload.workflow.id.toString();
5753
}
5854

5955
return github.context.runId.toString();

0 commit comments

Comments
 (0)