fix js errors

This commit is contained in:
David Hiendl 2023-12-02 17:56:32 +01:00
parent 161328e3ea
commit 7752e526a3

View File

@ -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);