Skip to content

Commit

Permalink
context: fix pull request ref
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Sep 27, 2024
1 parent 18c8bdd commit 958f229
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 958f229

Please sign in to comment.