From b1a2f85ed8d2158aee03b3efe896cc23685cdf83 Mon Sep 17 00:00:00 2001 From: Josh Dales Date: Mon, 27 Mar 2023 16:37:55 -0400 Subject: [PATCH] Update debugging indentation on the branch checks --- dist/index.js | 18 +++++++++--------- src/branch.ts | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dist/index.js b/dist/index.js index 85f84a75..8a0e2801 100644 --- a/dist/index.js +++ b/dist/index.js @@ -69,15 +69,15 @@ function checkAnyBranch(regexps, branchBase) { core.debug(` no branch name`); return false; } - core.debug(` checking "branch" pattern against ${branchName}`); + core.debug(` checking "branch" pattern against ${branchName}`); const matchers = regexps.map(regexp => new RegExp(regexp)); for (const matcher of matchers) { if (matchBranchPattern(matcher, branchName)) { - core.debug(` "branch" patterns matched against ${branchName}`); + core.debug(` "branch" patterns matched against ${branchName}`); return true; } } - core.debug(` "branch" patterns did not match against ${branchName}`); + core.debug(` "branch" patterns did not match against ${branchName}`); return false; } exports.checkAnyBranch = checkAnyBranch; @@ -87,25 +87,25 @@ function checkAllBranch(regexps, branchBase) { core.debug(` no branch name`); return false; } - core.debug(` checking "branch" pattern against ${branchName}`); + core.debug(` checking "branch" pattern against ${branchName}`); const matchers = regexps.map(regexp => new RegExp(regexp)); for (const matcher of matchers) { if (!matchBranchPattern(matcher, branchName)) { - core.debug(` "branch" patterns did not match against ${branchName}`); + core.debug(` "branch" patterns did not match against ${branchName}`); return false; } } - core.debug(` "branch" patterns matched against ${branchName}`); + core.debug(` "branch" patterns matched against ${branchName}`); return true; } exports.checkAllBranch = checkAllBranch; function matchBranchPattern(matcher, branchName) { - core.debug(` - ${matcher}`); + core.debug(` - ${matcher}`); if (matcher.test(branchName)) { - core.debug(` "branch" pattern matched`); + core.debug(` "branch" pattern matched`); return true; } - core.debug(` ${matcher} did not match`); + core.debug(` ${matcher} did not match`); return false; } diff --git a/src/branch.ts b/src/branch.ts index 4cf9cac4..fd6cca28 100644 --- a/src/branch.ts +++ b/src/branch.ts @@ -50,16 +50,16 @@ export function checkAnyBranch( return false; } - core.debug(` checking "branch" pattern against ${branchName}`); + core.debug(` checking "branch" pattern against ${branchName}`); const matchers = regexps.map(regexp => new RegExp(regexp)); for (const matcher of matchers) { if (matchBranchPattern(matcher, branchName)) { - core.debug(` "branch" patterns matched against ${branchName}`); + core.debug(` "branch" patterns matched against ${branchName}`); return true; } } - core.debug(` "branch" patterns did not match against ${branchName}`); + core.debug(` "branch" patterns did not match against ${branchName}`); return false; } @@ -73,26 +73,26 @@ export function checkAllBranch( return false; } - core.debug(` checking "branch" pattern against ${branchName}`); + core.debug(` checking "branch" pattern against ${branchName}`); const matchers = regexps.map(regexp => new RegExp(regexp)); for (const matcher of matchers) { if (!matchBranchPattern(matcher, branchName)) { - core.debug(` "branch" patterns did not match against ${branchName}`); + core.debug(` "branch" patterns did not match against ${branchName}`); return false; } } - core.debug(` "branch" patterns matched against ${branchName}`); + core.debug(` "branch" patterns matched against ${branchName}`); return true; } function matchBranchPattern(matcher: RegExp, branchName: string): boolean { - core.debug(` - ${matcher}`); + core.debug(` - ${matcher}`); if (matcher.test(branchName)) { - core.debug(` "branch" pattern matched`); + core.debug(` "branch" pattern matched`); return true; } - core.debug(` ${matcher} did not match`); + core.debug(` ${matcher} did not match`); return false; }