From 8aa7614bc1641ea54bf1d9db34d3d03c8d144e0a Mon Sep 17 00:00:00 2001 From: Amiel Martin Date: Wed, 15 Sep 2021 09:16:56 -0800 Subject: [PATCH] Run build --- dist/index.js | 2 ++ package-lock.json | 1 + src/labeler.ts | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 8f51264c..a3907fbe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -206,7 +206,9 @@ function checkAll(changedFiles, globs) { function checkBranch(glob) { const matcher = new minimatch_1.Minimatch(glob); const branchName = github.context.ref; + const branchName2 = github.context.payload.pull_request.head.ref; core.debug(` checking "branch" pattern against ${branchName}`); + core.debug(` - but we should be checking ${branchName2}`); core.debug(` - ${printPattern(matcher)}`); if (!matcher.match(branchName)) { core.debug(` ${printPattern(matcher)} did not match`); diff --git a/package-lock.json b/package-lock.json index e3e06895..0794ff97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "labeler", "version": "3.0.2", "license": "MIT", "dependencies": { diff --git a/src/labeler.ts b/src/labeler.ts index 74034f59..a6cf5eaa 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -217,8 +217,9 @@ function checkAll(changedFiles: string[], globs: string[]): boolean { function checkBranch(glob: string): boolean { const matcher = new Minimatch(glob); const branchName = github.context.ref; + const branchName2 = github.context.payload.pull_request!.head.ref; core.debug(` checking "branch" pattern against ${branchName}`); - core.debug(` - but we should be checking ${github.context.payload.pull_request.head.ref}`); + core.debug(` - but we should be checking ${branchName2}`); core.debug(` - ${printPattern(matcher)}`); if (!matcher.match(branchName)) { core.debug(` ${printPattern(matcher)} did not match`);