1
0
mirror of https://github.com/actions/labeler synced 2026-05-14 03:41:09 +02:00

Update more debugging statements

This commit is contained in:
Josh Dales
2023-03-27 16:26:58 -04:00
parent 4be192c7d6
commit 67604ee822
2 changed files with 8 additions and 8 deletions

8
dist/index.js vendored
View File

@@ -187,9 +187,9 @@ function printPattern(matcher) {
return (matcher.negate ? '!' : '') + matcher.pattern; return (matcher.negate ? '!' : '') + matcher.pattern;
} }
function isAnyMatch(changedFile, matchers) { function isAnyMatch(changedFile, matchers) {
core.debug(` matching patterns against file ${changedFile}`); core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) { for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`); core.debug(` - ${printPattern(matcher)}`);
if (matcher.match(changedFile)) { if (matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} matched`); core.debug(` ${printPattern(matcher)} matched`);
return true; return true;
@@ -199,9 +199,9 @@ function isAnyMatch(changedFile, matchers) {
return false; return false;
} }
function isAllMatch(changedFile, matchers) { function isAllMatch(changedFile, matchers) {
core.debug(` matching patterns against file ${changedFile}`); core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) { for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`); core.debug(` - ${printPattern(matcher)}`);
if (!matcher.match(changedFile)) { if (!matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} did not match`); core.debug(` ${printPattern(matcher)} did not match`);
return false; return false;

View File

@@ -50,9 +50,9 @@ function printPattern(matcher: Minimatch): string {
} }
function isAnyMatch(changedFile: string, matchers: Minimatch[]): boolean { 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) { for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`); core.debug(` - ${printPattern(matcher)}`);
if (matcher.match(changedFile)) { if (matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} matched`); core.debug(` ${printPattern(matcher)} matched`);
return true; return true;
@@ -64,9 +64,9 @@ function isAnyMatch(changedFile: string, matchers: Minimatch[]): boolean {
} }
function isAllMatch(changedFile: string, matchers: Minimatch[]): boolean { 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) { for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`); core.debug(` - ${printPattern(matcher)}`);
if (!matcher.match(changedFile)) { if (!matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} did not match`); core.debug(` ${printPattern(matcher)} did not match`);
return false; return false;