From 1c91bea01eb0bfdef3e76238190aff2199257bb0 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 18 Jan 2022 11:11:29 +0100 Subject: [PATCH] catch all Signed-off-by: blam Signed-off-by: blam --- .github/workflows/goalie-on-pr-review-or-response.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/goalie-on-pr-review-or-response.yaml b/.github/workflows/goalie-on-pr-review-or-response.yaml index 9f4c6996e2..f309d008ac 100644 --- a/.github/workflows/goalie-on-pr-review-or-response.yaml +++ b/.github/workflows/goalie-on-pr-review-or-response.yaml @@ -101,11 +101,13 @@ jobs: const reviewers = new Set(); + // The default catch all is not added to the codeowners response + codeowners['*'] = '@backstage/reviewers'; + for (const file of changedFiles) { for (const [pattern, owners] of Object.entries(codeowners)) { - - console.log(file.filename, pattern); - if (minimatch(file.filename, pattern)) { + + if (minimatch(`/${file.filename}`, pattern)) { for (const owner of owners) { reviewers.add(owner); } @@ -114,4 +116,5 @@ jobs: } console.log(reviewers); +