Skip to content

Commit

Permalink
fix(reporter): add support for retrieving commit SHA on push events (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
derevnjuk authored Feb 17, 2025
1 parent b510a6d commit 1753a86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/reporter/src/reporters/github/api/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if (process.env.GITHUB_EVENT_PATH) {
({ head_sha: commitSha } = eventData.check_run?.check_suite ?? {});
} else if (process.env.GITHUB_EVENT_NAME === 'pull_request') {
commitSha = eventData.pull_request.head.sha;
} else if (process.env.GITHUB_EVENT_NAME === 'push') {
commitSha = eventData.after;
} else {
throw new Error(
'No pull-request and commit data available for the request.'
Expand Down

0 comments on commit 1753a86

Please sign in to comment.