File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18478,6 +18478,12 @@ async function pullRequestInfo(payload = {}) {
1847818478 commit = pullRequest.head.sha;
1847918479 } else if (payload.after) {
1848018480 commit = payload.after;
18481+ } else if (payload.ref) {
18482+ const { data } = await client.rest.git.getRef({
18483+ ref: payload.ref.slice("refs/".length),
18484+ ...github.context.repo,
18485+ });
18486+ commit = data.object.sha;
1848118487 }
1848218488
1848318489 return { pullRequestNumber, commit };
Original file line number Diff line number Diff line change @@ -324,6 +324,12 @@ async function pullRequestInfo(payload = {}) {
324324 commit = pullRequest . head . sha ;
325325 } else if ( payload . after ) {
326326 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 ;
327333 }
328334
329335 return { pullRequestNumber, commit } ;
You can’t perform that action at this time.
0 commit comments