mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 10:55:23 -08:00
Process input and create check-run
This commit is contained in:
11
src/utils/github-utils.ts
Normal file
11
src/utils/github-utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import * as github from '@actions/github'
|
||||
import {EventPayloads} from '@octokit/webhooks'
|
||||
|
||||
export function getCheckRunSha(): string {
|
||||
if (github.context.payload.pull_request) {
|
||||
const pr = github.context.payload.pull_request as EventPayloads.WebhookPayloadPullRequestPullRequest
|
||||
return pr.head.sha
|
||||
}
|
||||
|
||||
return github.context.sha
|
||||
}
|
||||
Reference in New Issue
Block a user