From 7752e526a3acb3653204ccc05a5fd21054b1ecbd Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Sat, 2 Dec 2023 17:56:32 +0100 Subject: [PATCH] fix js errors --- src/gather.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gather.js b/src/gather.js index 5b158ed..ce3a2c4 100644 --- a/src/gather.js +++ b/src/gather.js @@ -44,7 +44,7 @@ export function gather_information(debug = false, output = false) { r.git_default_branch = github.context.payload?.repository?.defaultBranch; r.git_is_pull_request = github.context.payload.pull_request != null; - if (git_is_pull_request) { + if (r.git_is_pull_request) { const baseRef = github.context.baseRef || process.env.BODY_REF; const headRef = github.context.payload?.pull_request?.head?.ref || process.env.HEAD_REF; @@ -57,7 +57,7 @@ export function gather_information(debug = false, output = false) { } // gather regular branch info, also applies to tags - if (git_is_tag || git_is_branch) { + if (r.git_is_tag || r.git_is_branch) { if (!github.context.ref.startsWith("refs/heads/")) { throw new Error( "Failed to determine branch for non-PR and non-Tag action", @@ -69,7 +69,7 @@ export function gather_information(debug = false, output = false) { } // parse semver for tags - if (git_is_tag) { + if (r.git_is_tag) { r.git_tag = github.context.ref.slice("refs/tags/".length); const parsed = semverParser.parseSemVer(r.git_tag);