diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7204993575..9bffd78bea 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -80,4 +80,8 @@ /styles/wikipedia @GitMuslim /styles/wikiwand @Tnixc /styles/youtube @isabelroses @uncenter -/styles/nextjs @Dandraghas \ No newline at end of file +/styles/nextjs @Dandraghas + +.github/CODEOWNERS @catppuccin/userstyles-staff +/scripts/ @catppuccin/userstyles-staff +/template/ @catppuccin/userstyles-staff \ No newline at end of file diff --git a/scripts/generate/main.ts b/scripts/generate/main.ts index cb21ef28aa..4a4638307e 100755 --- a/scripts/generate/main.ts +++ b/scripts/generate/main.ts @@ -52,15 +52,25 @@ await syncIssueLabels(userstylesData.userstyles); /** * Keep `.github/CODEOWNERS` in sync with the userstyle metadata. */ -await updateFile( - join(REPO_ROOT, ".github/CODEOWNERS"), - Object.entries(userstylesData.userstyles) - .filter(([_, { "current-maintainers": currentMaintainers }]) => currentMaintainers.length > 0) +const CODEOWNERS_FILE = ".github/CODEOWNERS"; +const maintainersCodeOwners = () => { + return Object.entries(userstylesData.userstyles) + .filter(([_, { "current-maintainers": currentMaintainers }]) => + currentMaintainers.length > 0 + ) .map(([slug, { "current-maintainers": currentMaintainers }]) => { const codeOwners = currentMaintainers .map((maintainer) => `@${maintainer.url.split("/").pop()}`) .join(" "); return `/styles/${slug} ${codeOwners}`; }) - .join("\n"), + .join("\n"); +}; +const userstylesStaffCodeOwners = () => { + const paths = [CODEOWNERS_FILE, "/scripts/", "/template/"]; + return paths.map((path) => `${path} @catppuccin/userstyles-staff`).join("\n"); +}; +await updateFile( + join(REPO_ROOT, CODEOWNERS_FILE), + `${maintainersCodeOwners()}\n\n${userstylesStaffCodeOwners()}`, );