Do commit SHA edit for pull_request*

This commit is contained in:
Tom Hu
2021-03-08 19:11:29 -05:00
parent ddfe212d72
commit e77dab65bf
2 changed files with 8 additions and 6 deletions

View File

@@ -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}`);