From 958f229292035cfcc460836d5080c8032fadab26 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Fri, 27 Sep 2024 18:19:01 +0200 Subject: [PATCH] context: fix pull request ref Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/context.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/context.ts b/src/context.ts index 92aae9d7..55564882 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; }