mirror of
https://github.com/actions/labeler.git
synced 2025-12-15 14:37:35 +00:00
Adjust the indenting again
This commit is contained in:
@@ -46,7 +46,7 @@ export function checkAnyBranch(
|
||||
): boolean {
|
||||
const branchName = getBranchName(branchBase);
|
||||
if (!branchName) {
|
||||
core.debug(` no branch name`);
|
||||
core.debug(` no branch name`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export function checkAllBranch(
|
||||
): boolean {
|
||||
const branchName = getBranchName(branchBase);
|
||||
if (!branchName) {
|
||||
core.debug(` no branch name`);
|
||||
core.debug(` no branch name`);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,30 +50,30 @@ function printPattern(matcher: Minimatch): string {
|
||||
}
|
||||
|
||||
function isAnyMatch(changedFile: string, matchers: Minimatch[]): boolean {
|
||||
core.debug(` matching patterns against file ${changedFile}`);
|
||||
core.debug(` matching patterns against file ${changedFile}`);
|
||||
for (const matcher of matchers) {
|
||||
core.debug(` - ${printPattern(matcher)}`);
|
||||
core.debug(` - ${printPattern(matcher)}`);
|
||||
if (matcher.match(changedFile)) {
|
||||
core.debug(` ${printPattern(matcher)} matched`);
|
||||
core.debug(` ${printPattern(matcher)} matched`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
core.debug(` no patterns matched`);
|
||||
core.debug(` no patterns matched`);
|
||||
return false;
|
||||
}
|
||||
|
||||
function isAllMatch(changedFile: string, matchers: Minimatch[]): boolean {
|
||||
core.debug(` matching patterns against file ${changedFile}`);
|
||||
core.debug(` matching patterns against file ${changedFile}`);
|
||||
for (const matcher of matchers) {
|
||||
core.debug(` - ${printPattern(matcher)}`);
|
||||
core.debug(` - ${printPattern(matcher)}`);
|
||||
if (!matcher.match(changedFile)) {
|
||||
core.debug(` ${printPattern(matcher)} did not match`);
|
||||
core.debug(` ${printPattern(matcher)} did not match`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
core.debug(` all patterns matched`);
|
||||
core.debug(` all patterns matched`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -84,12 +84,12 @@ export function checkAnyChangedFiles(
|
||||
const matchers = globs.map(g => new Minimatch(g));
|
||||
for (const changedFile of changedFiles) {
|
||||
if (isAnyMatch(changedFile, matchers)) {
|
||||
core.debug(` "any" patterns matched against ${changedFile}`);
|
||||
core.debug(` "any" patterns matched against ${changedFile}`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
core.debug(` "any" patterns did not match any files`);
|
||||
core.debug(` "any" patterns did not match any files`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -100,11 +100,11 @@ export function checkAllChangedFiles(
|
||||
const matchers = globs.map(g => new Minimatch(g));
|
||||
for (const changedFile of changedFiles) {
|
||||
if (!isAllMatch(changedFile, matchers)) {
|
||||
core.debug(` "all" patterns did not match against ${changedFile}`);
|
||||
core.debug(` "all" patterns did not match against ${changedFile}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
core.debug(` "all" patterns matched all files`);
|
||||
core.debug(` "all" patterns matched all files`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ export function checkAll(
|
||||
matchConfigs: BaseMatchConfig[],
|
||||
changedFiles: string[]
|
||||
): boolean {
|
||||
core.debug(` checking "all" patterns`);
|
||||
core.debug(` checking "all" patterns`);
|
||||
if (!Object.keys(matchConfigs).length) {
|
||||
core.debug(` no "all" patterns to check`);
|
||||
return false;
|
||||
@@ -286,7 +286,7 @@ export function checkAll(
|
||||
}
|
||||
}
|
||||
|
||||
core.debug(` "all" patterns matched all files`);
|
||||
core.debug(` "all" patterns matched all configs`);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user