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); +