Skip to content

Commit 958f229

Browse files
committed
context: fix pull request ref
Signed-off-by: CrazyMax <[email protected]>
1 parent 18c8bdd commit 958f229

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)