refactor(userstyles.yml): remove raw GitHub links (#1690)
Same reasoning as https://github.com/catppuccin/catppuccin/pull/2744
This commit is contained in:
1 parent
0a24bda9f5
commit
9e1bee553f
5 files changed
+119
-236
No files matched your search
@@ -48,7 +48,7 @@ function maintainersCodeOwners() {
|
||||
)
|
||||
.map(([slug, { "current-maintainers": currentMaintainers }]) => {
|
||||
const codeOwners = currentMaintainers
|
||||
.map((maintainer) => `@${maintainer.url.split("/").pop()}`)
|
||||
.map((name) => `@${name}`)
|
||||
.join(" ");
|
||||
return `/styles/${slug} ${codeOwners}`;
|
||||
})
|
||||
|
||||
@@ -31,18 +31,18 @@ const heading = (
|
||||
});
|
||||
};
|
||||
|
||||
function extractName(
|
||||
function getNameWithGitHubUrl(
|
||||
collaborators?:
|
||||
| UserstylesSchema.CurrentMaintainers
|
||||
| UserstylesSchema.PastMaintainers,
|
||||
) {
|
||||
// no-op when undefined
|
||||
if (!collaborators) return;
|
||||
// set the name to the github.com/<name>
|
||||
return collaborators.map((c) => {
|
||||
// keep name & set the url to the github.com/<name>
|
||||
return collaborators.map((name) => {
|
||||
return {
|
||||
...c,
|
||||
name: c.url.split("/").pop(),
|
||||
name,
|
||||
url: `https://github.com/${name}`
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -73,8 +73,8 @@ export function generateStyleReadmes(userstyles: UserstylesSchema.Userstyles) {
|
||||
note: readme.note,
|
||||
faq: readme.faq,
|
||||
collaborators: {
|
||||
currentMaintainers: extractName(currentMaintainers),
|
||||
pastMaintainers: extractName(pastMaintainers),
|
||||
currentMaintainers: getNameWithGitHubUrl(currentMaintainers),
|
||||
pastMaintainers: getNameWithGitHubUrl(pastMaintainers),
|
||||
},
|
||||
});
|
||||
Deno.writeTextFile(
|
||||
|
||||
Reference in new issue
Block a user