From 89f6b77325fea1a9109ee19bba2d96a399873fb8 Mon Sep 17 00:00:00 2001 From: Josh Dales <30500472+joshdales@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:13:56 -0400 Subject: [PATCH] minor adjustment for successful branch matching. To better follow the any convention as opposed to all --- src/labeler.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/labeler.ts b/src/labeler.ts index f82d10ae..9fdff28e 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -225,13 +225,13 @@ function checkAll(changedFiles: string[], globs: string[]): boolean { function matchBranchPattern(matcher: IMinimatch, branchName: string): boolean { core.debug(` - ${printPattern(matcher)}`); - if (!matcher.match(branchName)) { - core.debug(` ${printPattern(matcher)} did not match`); - return false; + if (matcher.match(branchName)) { + core.debug(` "branch" pattern matched`); + return true; } - core.debug(` "branch" pattern matched`); - return true; + core.debug(` ${printPattern(matcher)} did not match`); + return false; } function checkBranch(glob: string | string[]): boolean {