From 4ac17648a440cb3a1a4a01f25306ed630bf19984 Mon Sep 17 00:00:00 2001 From: Josh Dales Date: Thu, 11 May 2023 17:02:05 -0400 Subject: [PATCH] Add a guard clause to stop false changed-files positives --- src/labeler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/labeler.ts b/src/labeler.ts index 7325e646..d42b03e1 100644 --- a/src/labeler.ts +++ b/src/labeler.ts @@ -273,6 +273,11 @@ export function checkAll( } if (matchConfig.changedFiles) { + if (!changedFiles.length) { + core.debug(` no files to check "changed-files" patterns against`); + return false; + } + if (!checkAllChangedFiles(changedFiles, matchConfig.changedFiles)) { return false; }