Update debugging indentation on the branch checks

This commit is contained in:
Josh Dales
2023-03-27 16:37:55 -04:00
parent 67604ee822
commit b1a2f85ed8
2 changed files with 18 additions and 18 deletions

18
dist/index.js vendored
View File

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