catch all
Signed-off-by: blam <ben@blam.sh> Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user