We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 717143c commit a899e95Copy full SHA for a899e95
src/action.js
@@ -324,6 +324,12 @@ async function pullRequestInfo(payload = {}) {
324
commit = pullRequest.head.sha;
325
} else if (payload.after) {
326
commit = payload.after;
327
+ } else if (payload.ref) {
328
+ const { data } = await client.rest.git.getRef({
329
+ ref: payload.ref.slice("refs/".length),
330
+ ...github.context.repo,
331
+ });
332
+ commit = data.object.sha;
333
}
334
335
return { pullRequestNumber, commit };
0 commit comments