Skip to content

Commit 38d1dce

Browse files
authored
Merge pull request #457 from crazy-max/fix-github-ref-pr
context: fix pull request ref
2 parents 18c8bdd + 958f229 commit 38d1dce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ export class Context {
4545
}
4646
if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {
4747
gitRef = github.context.sha;
48+
} else if (gitRef.startsWith(`refs/pull/`)) {
49+
gitRef = gitRef.replace(/\/merge$/g, '/head');
4850
}
4951
return gitRef;
5052
}

0 commit comments

Comments
 (0)