Skip to content

Commit

Permalink
Merge branch 'master' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
sarisia committed Apr 2, 2021
2 parents cee1486 + 918cdde commit f1dd59f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"author": "Sarisia",
"license": "MIT",
"devDependencies": {
"@types/jest": "^26.0.21",
"@types/jest": "^26.0.22",
"jest": "^26.6.3",
"ts-jest": "^26.5.4",
"typescript": "^4.2.3"
},
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@types/node": "^14.14.35",
"@types/node": "^14.14.37",
"axios": "^0.21.1"
}
}
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export function getPayload(inputs: Readonly<Inputs>): Object {
const { owner, repo } = ctx.repo
const { eventName, sha, ref, workflow, actor, payload } = ctx
const repoURL = `https://github.com/${owner}/${repo}`
const workflowURL = `${repoURL}/commit/${sha}/checks`
// if the trigger is pull_request, check `github.event.pull_request.head.sha` first.
// see issues/132
const validSHA = ctx.payload.pull_request?.head?.sha || sha
const workflowURL = `${repoURL}/commit/${validSHA}/checks`

logDebug(JSON.stringify(payload))

Expand Down

0 comments on commit f1dd59f

Please sign in to comment.