Skip to content

Commit

Permalink
Do commit SHA edit for pull_request*
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu committed Mar 9, 2021
1 parent ddfe212 commit e77dab6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59626,9 +59626,9 @@ var buildExec = function () {
if (overrideCommit) {
execArgs.push('-C', "" + overrideCommit);
}
else {
// attempt commit detection
execArgs.push('-C', "" + context.sha);
else if ("" + context.eventName == 'pull_request' ||
"" + context.eventName == 'pull_request_target') {
execArgs.push('-C', "" + context.event.pull_request.head.sha);
}
if (overridePr) {
execArgs.push('-P', "" + overridePr);
Expand Down
8 changes: 5 additions & 3 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ const buildExec = () => {
}
if (overrideCommit) {
execArgs.push('-C', `${overrideCommit}`);
} else {
// attempt commit detection
execArgs.push('-C', `${context.sha}`);
} else if (
`${context.eventName}` == 'pull_request' ||
`${context.eventName}` == 'pull_request_target'
) {
execArgs.push('-C', `${context.event.pull_request.head.sha}`);
}
if (overridePr) {
execArgs.push('-P', `${overridePr}`);
Expand Down

0 comments on commit e77dab6

Please sign in to comment.