From 2953c18c049d68f082f7c2a3fcc26fc0fb240ebf Mon Sep 17 00:00:00 2001 From: Mihai GALOS Date: Thu, 13 Mar 2025 09:52:26 +0100 Subject: [PATCH 1/2] fix: Refs - Remove prefix, allow slash in branch name --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f6c43fc..d22577a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,7 +78,8 @@ async function promiseAllInBatches(subtreeSplits: subtreeSplit[], batchSize: num return; } - const branch = context.ref.split('/').pop(); + //const branch = context.ref.split('/').pop(); + const branch = context.ref.replace(/^refs\/head\//, '') if (typeof branch == 'undefined') { core.error('Unable to get branch name from event data. Got ref "'+context.ref+'"'); From 69789d03632c248e05830e3812551199294b4d7a Mon Sep 17 00:00:00 2001 From: Mihai GALOS Date: Thu, 13 Mar 2025 09:54:08 +0100 Subject: [PATCH 2/2] Update index.ts --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index d22577a..1fe6255 100644 --- a/src/index.ts +++ b/src/index.ts @@ -78,8 +78,7 @@ async function promiseAllInBatches(subtreeSplits: subtreeSplit[], batchSize: num return; } - //const branch = context.ref.split('/').pop(); - const branch = context.ref.replace(/^refs\/head\//, '') + const branch = context.ref.replace(/^refs\/heads\//, '') if (typeof branch == 'undefined') { core.error('Unable to get branch name from event data. Got ref "'+context.ref+'"');