Process input and create check-run

This commit is contained in:
Michal Dorner 2020-11-17 22:21:16 +01:00
parent bc706859ad
commit e97dbdd3e5
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
8 changed files with 13780 additions and 44 deletions

11
src/utils/github-utils.ts Normal file
View 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
}