chore: think the match should be right now

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-01-18 11:23:56 +01:00
parent 1c91bea01e
commit 995ab54b72
@@ -102,12 +102,12 @@ jobs:
const reviewers = new Set();
// The default catch all is not added to the codeowners response
codeowners['*'] = '@backstage/reviewers';
codeowners['*'] = ['@backstage/reviewers'];
for (const file of changedFiles) {
const prefixedFile = `/${file.filename}`;
for (const [pattern, owners] of Object.entries(codeowners)) {
if (minimatch(`/${file.filename}`, pattern)) {
if (minimatch(`/${file.filename}`, `${pattern}/*`, { matchBase: true })) {
for (const owner of owners) {
reviewers.add(owner);
}