Skip to content

Commit

Permalink
Merge pull request #457 from crazy-max/fix-github-ref-pr
Browse files Browse the repository at this point in the history
context: fix pull request ref
  • Loading branch information
crazy-max authored Sep 30, 2024
2 parents 18c8bdd + 958f229 commit 38d1dce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export class Context {
}
if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {
gitRef = github.context.sha;
} else if (gitRef.startsWith(`refs/pull/`)) {
gitRef = gitRef.replace(/\/merge$/g, '/head');
}
return gitRef;
}
Expand Down

0 comments on commit 38d1dce

Please sign in to comment.