mirror of
https://github.com/actions/labeler.git
synced 2025-12-10 11:41:56 +00:00
Update debugging indentation on the branch checks
This commit is contained in:
18
dist/index.js
vendored
18
dist/index.js
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user