diff --git a/src/context.ts b/src/context.ts index 92aae9d..5556488 100644 --- a/src/context.ts +++ b/src/context.ts @@ -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; }