catch all

Signed-off-by: blam <ben@blam.sh>

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-01-18 11:11:29 +01:00
parent 407d010e5c
commit 1c91bea01e
@@ -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);