From 9e1bee553faf456e953fa7c126cdf9410d2de8cf Mon Sep 17 00:00:00 2001 From: Hammy <58985301+sgoudham@users.noreply.github.com> Date: Fri, 4 Apr 2025 00:58:25 +0100 Subject: [PATCH] refactor(userstyles.yml): remove raw GitHub links (#1690) Same reasoning as https://github.com/catppuccin/catppuccin/pull/2744 --- scripts/generate/main.ts | 2 +- scripts/generate/readme-styles.ts | 14 +- scripts/types/userstyles.d.ts | 26 +-- scripts/userstyles.schema.json | 56 ++----- scripts/userstyles.yml | 257 +++++++++++------------------- 5 files changed, 119 insertions(+), 236 deletions(-) diff --git a/scripts/generate/main.ts b/scripts/generate/main.ts index a86b9fde..4293e37f 100755 --- a/scripts/generate/main.ts +++ b/scripts/generate/main.ts @@ -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}`; }) diff --git a/scripts/generate/readme-styles.ts b/scripts/generate/readme-styles.ts index d6a96e3e..32e67d97 100644 --- a/scripts/generate/readme-styles.ts +++ b/scripts/generate/readme-styles.ts @@ -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/ - return collaborators.map((c) => { + // keep name & set the url to the github.com/ + 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( diff --git a/scripts/types/userstyles.d.ts b/scripts/types/userstyles.d.ts index 53a7163c..72cf4c5b 100644 --- a/scripts/types/userstyles.d.ts +++ b/scripts/types/userstyles.d.ts @@ -101,42 +101,22 @@ export type Question = string; * An answer to the question about the userstyle. */ export type Answer = string; -/** - * The GitHub profile link of the collaborator to show in the userstyle README. - */ -export type GitHubProfile = string; /** * List of all active maintainers for this userstyle. */ -export type CurrentMaintainers = { - url: GitHubProfile; -}[]; +export type CurrentMaintainers = string[]; /** * List of all users that have maintained this userstyle in the past. * * @minItems 1 */ -export type PastMaintainers = [ - { - url: GitHubProfile; - }, - ...{ - url: GitHubProfile; - }[] -]; +export type PastMaintainers = [string, ...string[]]; /** * Represents all maintainers and contributors to all userstyles. * * @minItems 1 */ -export type AllCollaborators = [ - { - url: GitHubProfile; - }, - ...{ - url: GitHubProfile; - }[] -]; +export type AllCollaborators = [string, ...string[]]; export interface UserstylesSchema { userstyles?: Userstyles; diff --git a/scripts/userstyles.schema.json b/scripts/userstyles.schema.json index 25e91546..1567089a 100644 --- a/scripts/userstyles.schema.json +++ b/scripts/userstyles.schema.json @@ -14,9 +14,7 @@ "title": "Userstyle", "type": "object", "description": "The directory of the userstyle.", - "examples": [ - "youtube" - ], + "examples": ["youtube"], "additionalProperties": false, "properties": { "name": { @@ -30,18 +28,11 @@ "type": "string" }, "minItems": 2, - "examples": [ - [ - "AniList", - "AniChart" - ] - ] + "examples": [["AniList", "AniChart"]] }, { "type": "string", - "examples": [ - "YouTube" - ] + "examples": ["YouTube"] } ] }, @@ -73,19 +64,14 @@ "lavender", "text" ], - "examples": [ - "pink" - ] + "examples": ["pink"] }, "icon": { "$id": "#userstyles/userstyle/icon", "title": "Icon", "description": "The icon to use on the website. This should be the same name as the SVG file on https://simpleicons.org/. If a `.svg` suffix is present, it's taken from the local website repository resources.", "type": "string", - "examples": [ - "twitch", - "twitch.svg" - ] + "examples": ["twitch", "twitch.svg"] }, "readme": { "$id": "#userstyles/userstyle/readme", @@ -106,17 +92,12 @@ }, "minItems": 2, "examples": [ - [ - "https://anilist.co", - "https://anichart.net" - ] + ["https://anilist.co", "https://anichart.net"] ] }, { "type": "string", - "examples": [ - "https://github.com" - ] + "examples": ["https://github.com"] } ] }, @@ -147,16 +128,11 @@ "description": "An answer to the question about the userstyle." } }, - "required": [ - "question", - "answer" - ] + "required": ["question", "answer"] } } }, - "required": [ - "app-link" - ] + "required": ["app-link"] }, "current-maintainers": { "$id": "#userstyles/userstyle/current-maintainers", @@ -196,20 +172,10 @@ "$defs": { "collaborators": { "$id": "#collaborators", + "description": "The GitHub username of the collaborator.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "title": "GitHub Profile", - "description": "The GitHub profile link of the collaborator to show in the userstyle README." - } - }, - "required": [ - "url" - ] + "type": "string" } }, "categories": { diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index 6bf48cfa..da724408 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -1,130 +1,67 @@ collaborators: - - &nikitarevenco - url: https://github.com/nik-rev - - &anubisnekhet - url: https://github.com/AnubisNekhet - - &ndsboy - url: https://github.com/ndsboy - - &jn-sena - url: https://github.com/jn-sena - - &watatomo - url: https://github.com/watatomo - - &ryanccn - url: https://github.com/ryanccn - - &pocco81 - url: https://github.com/Pocco81 - - &glowingumbreon - url: https://github.com/GlowingUmbreon - - &justtobbi - url: https://github.com/justTOBBI - - &unseen-ninja - url: https://github.com/unseen-ninja - - &lucasmelin - url: https://github.com/lucasmelin - - &gingeh - url: https://github.com/Gingeh - - &isabelroses - url: https://github.com/isabelroses - - &thismoon - url: https://github.com/thismoon - - &cecelot - url: https://github.com/cecelot - - &soya-daizu - url: https://github.com/soya-daizu - - &jayylmao - url: https://github.com/jayylmao - - &sekki21956 - url: https://github.com/Sekki21956 - - &winston - url: https://github.com/nekowinston - - &tnixc - url: https://github.com/Tnixc - - &elkrien - url: https://github.com/elkrien - - &thememesniper - url: https://github.com/TheMemeSniper - - &spaghettiosareyummy - url: https://github.com/spaghettiosareyummy - - &stonks3141 - url: https://github.com/Stonks3141 - - &rubyowo - url: https://github.com/rubyowo - - &gandalf-the-blue - url: https://github.com/Gandalf-the-Blue - - &francorav - url: https://github.com/FrancoRav - - &coldenate - url: https://github.com/coldenate - - &skelebro1 - url: https://github.com/skelebro1 - - &r58Playz - url: https://github.com/r58Playz - - &rockquiet - url: https://github.com/rockquiet - - &nyameliaaaa - url: https://github.com/Nyameliaaaa - - &meowcelinee - url: https://github.com/Meowcelinee - - &bartlibert - url: https://github.com/bartlibert - - &BlankParticle - url: https://github.com/BlankParticle - - &genshibe - url: https://github.com/GenShibe - - &coopw1 - url: https://github.com/coopw1 - - &rooot - url: https://github.com/RoootTheFox - - &itzTheMeow - url: https://github.com/itzTheMeow - - &Dandraghas - url: https://github.com/Dandraghas - - &uncenter - url: https://github.com/uncenter - - &thomas-philippot - url: https://github.com/thomas-philippot - - &Guaxinim5573 - url: https://github.com/Guaxinim5573 - - &trinkey - url: https://github.com/trinkey - - &NK308 - url: https://github.com/NK308 - - &00dani - url: https://github.com/00dani - - &kerichdev - url: https://github.com/kerichdev - - &Flapperoo - url: https://github.com/Flapperoo - - &sofiedotcafe - url: https://github.com/sofiedotcafe - - &stellophiliac - url: https://github.com/stellophiliac - - &bunfluff - url: https://github.com/bunfluff - - &neongamerbot - url: https://github.com/NeonGamerBot-QK - - &orangci - url: https://github.com/orangci - - &Lichthagel - url: https://github.com/Lichthagel - - &comfysage - url: https://github.com/comfysage - - &TadoTheMiner - url: https://github.com/TadoTheMiner - - &mxgic1337 - url: https://github.com/mxgic1337 - - &steinuil - url: https://github.com/steinuil - - &husjon - url: https://github.com/husjon - - &RaiderHCPlay - url: https://github.com/RaiderHCPlay - - &pynappo - url: https://github.com/pynappo - - &nuexq - url: https://github.com/nuexq - - &WalkQuackBack - url: https://github.com/WalkQuackBack + - &nik-rev nik-rev + - &AnubisNekhet AnubisNekhet + - &ndsboy ndsboy + - &jn-sena jn-sena + - &watatomo watatomo + - &ryanccn ryanccn + - &Pocco81 Pocco81 + - &GlowingUmbreon GlowingUmbreon + - &justTOBBI justTOBBI + - &unseen-ninja unseen-ninja + - &lucasmelin lucasmelin + - &Gingeh Gingeh + - &isabelroses isabelroses + - &thismoon thismoon + - &cecelot cecelot + - &soya-daizu soya-daizu + - &jayylmao jayylmao + - &Sekki21956 Sekki21956 + - &nekowinston nekowinston + - &Tnixc Tnixc + - &elkrien elkrien + - &TheMemeSniper TheMemeSniper + - &spaghettiosareyummy spaghettiosareyummy + - &Stonks3141 Stonks3141 + - &rubyowo rubyowo + - &Gandalf-the-Blue Gandalf-the-Blue + - &FrancoRav FrancoRav + - &coldenate coldenate + - &skelebro1 skelebro1 + - &r58Playz r58Playz + - &rockquiet rockquiet + - &Nyameliaaaa Nyameliaaaa + - &Meowcelinee Meowcelinee + - &bartlibert bartlibert + - &BlankParticle BlankParticle + - &GenShibe GenShibe + - &coopw1 coopw1 + - &RoootTheFox RoootTheFox + - &itzTheMeow itzTheMeow + - &Dandraghas Dandraghas + - &uncenter uncenter + - &thomas-philippot thomas-philippot + - &Guaxinim5573 Guaxinim5573 + - &trinkey trinkey + - &NK308 NK308 + - &00dani 00dani + - &kerichdev kerichdev + - &Flapperoo Flapperoo + - &sofiedotcafe sofiedotcafe + - &stellophiliac stellophiliac + - &bunfluff bunfluff + - &NeonGamerBot-QK NeonGamerBot-QK + - &orangci orangci + - &Lichthagel Lichthagel + - &comfysage comfysage + - &TadoTheMiner TadoTheMiner + - &mxgic1337 mxgic1337 + - &steinuil steinuil + - &husjon husjon + - &RaiderHCPlay RaiderHCPlay + - &pynappo pynappo + - &nuexq nuexq + - &WalkQuackBack WalkQuackBack userstyles: advent-of-code: @@ -157,7 +94,7 @@ userstyles: readme: app-link: [https://anilist.co, https://anichart.net] note: This theme also applies to [AniChart](https://anichart.net/), an extension of AniList. - current-maintainers: [*anubisnekhet] + current-maintainers: [*AnubisNekhet] arch-wiki: name: Arch Wiki categories: [wiki] @@ -167,14 +104,14 @@ userstyles: app-link: https://wiki.archlinux.org note: "Make sure to use the default **Light** theme." current-maintainers: [] - past-maintainers: [*genshibe] + past-maintainers: [*GenShibe] boringproxy: name: boringproxy categories: [development] color: text readme: app-link: https://boringproxy.io - current-maintainers: [*gandalf-the-blue] + current-maintainers: [*Gandalf-the-Blue] brave-search: name: Brave Search categories: [search_engine] @@ -191,7 +128,7 @@ userstyles: color: blue readme: app-link: https://bsky.app - current-maintainers: [*rooot] + current-maintainers: [*RoootTheFox] bstats: name: bStats categories: [analytics, game_development] @@ -208,7 +145,7 @@ userstyles: readme: app-link: https://www.instructure.com/canvas current-maintainers: [*pynappo] - past-maintainers: [*thememesniper] + past-maintainers: [*TheMemeSniper] chatgpt: name: ChatGPT categories: [artificial_intelligence] @@ -224,7 +161,7 @@ userstyles: color: peach readme: app-link: https://chatreplay.stream - current-maintainers: [*anubisnekhet] + current-maintainers: [*AnubisNekhet] chess.com: name: Chess.com categories: [game] @@ -249,7 +186,7 @@ userstyles: readme: app-link: https://codeberg.org current-maintainers: [*isabelroses] - past-maintainers: [*justtobbi] + past-maintainers: [*justTOBBI] cobalt: name: cobalt categories: [productivity, photo_and_video] @@ -296,7 +233,7 @@ userstyles: color: peach readme: app-link: https://duckduckgo.com - current-maintainers: [*genshibe] + current-maintainers: [*GenShibe] ecosia: name: Ecosia categories: [search_engine] @@ -342,7 +279,7 @@ userstyles: note: "Switch to a default GitHub light/dark theme via **Settings** > **Appearance** for the best experience!" app-link: https://github.com current-maintainers: [*uncenter] - past-maintainers: [*unseen-ninja, *pocco81, *glowingumbreon] + past-maintainers: [*unseen-ninja, *Pocco81, *GlowingUmbreon] gleam.run: name: gleam.run categories: [development] @@ -391,7 +328,7 @@ userstyles: color: sapphire readme: app-link: https://photos.google.com - current-maintainers: [*genshibe] + current-maintainers: [*GenShibe] grabify: name: Grabify categories: [development, productivity] @@ -459,7 +396,7 @@ userstyles: color: sky readme: app-link: https://github.com/benphelps/homepage - current-maintainers: [*gandalf-the-blue] + current-maintainers: [*Gandalf-the-Blue] hoogle: name: Hoogle categories: [development, search_engine] @@ -475,14 +412,14 @@ userstyles: color: green readme: app-link: https://hoppscotch.io - current-maintainers: [*justtobbi] + current-maintainers: [*justTOBBI] learn-x-in-y-minutes: name: Learn X in Y Minutes categories: [development, wiki] color: blue readme: app-link: https://learnxinyminutes.com - current-maintainers: [*nikitarevenco] + current-maintainers: [*nik-rev] hyperpipe: name: Hyperpipe categories: [music] @@ -519,7 +456,7 @@ userstyles: color: pink readme: app-link: https://instagram.com - current-maintainers: [*genshibe] + current-maintainers: [*GenShibe] past-maintainers: [*isabelroses] invidious: name: Invidious @@ -529,7 +466,7 @@ userstyles: readme: app-link: https://invidious.io current-maintainers: [] - past-maintainers: [*unseen-ninja, *winston] + past-maintainers: [*unseen-ninja, *nekowinston] invokeai: name: InvokeAI categories: [artificial_intelligence, productivity] @@ -565,8 +502,8 @@ userstyles: color: red readme: app-link: https://last.fm - current-maintainers: [*anubisnekhet] - past-maintainers: [*gingeh] + current-maintainers: [*AnubisNekhet] + past-maintainers: [*Gingeh] lemmy: name: Lemmy categories: [discussion_forum, social_networking] @@ -574,7 +511,7 @@ userstyles: color: green readme: app-link: https://lemmy.world - current-maintainers: [*gandalf-the-blue] + current-maintainers: [*Gandalf-the-Blue] libreddit: name: ["Libreddit", "Redlib"] categories: [discussion_forum, social_networking] @@ -701,7 +638,7 @@ userstyles: color: blue readme: app-link: https://namemc.com - current-maintainers: [*meowcelinee] + current-maintainers: [*Meowcelinee] nitter: name: Nitter categories: [social_networking, discussion_forum] @@ -709,7 +646,7 @@ userstyles: color: blue readme: app-link: https://nitter.net - current-maintainers: [*anubisnekhet] + current-maintainers: [*AnubisNekhet] nixos-manual: name: ["NixOS Manual", "Nixpkgs Manual"] categories: [development, wiki] @@ -736,7 +673,7 @@ userstyles: readme: app-link: https://wiki.nixos.org current-maintainers: [*orangci] - past-maintainers: [*winston] + past-maintainers: [*nekowinston] npm: name: npm categories: [development] @@ -751,7 +688,7 @@ userstyles: color: text readme: app-link: https://ollama.com - current-maintainers: [*neongamerbot] + current-maintainers: [*NeonGamerBot-QK] openmediavault: name: openmediavault categories: [file_manager, productivity] @@ -759,7 +696,7 @@ userstyles: color: sky readme: app-link: https://www.openmediavault.org - current-maintainers: [*gandalf-the-blue] + current-maintainers: [*Gandalf-the-Blue] paste.rs: name: paste.rs categories: [development] @@ -768,7 +705,7 @@ userstyles: readme: app-link: https://paste.rs current-maintainers: [*Guaxinim5573] - past-maintainers: [*stonks3141] + past-maintainers: [*Stonks3141] perplexity: name: Perplexity categories: [artificial_intelligence, search_engine] @@ -776,7 +713,7 @@ userstyles: color: teal readme: app-link: https://www.perplexity.ai - current-maintainers: [*tnixc] + current-maintainers: [*Tnixc] past-maintainers: [*isabelroses] phanpy: name: Phanpy @@ -792,7 +729,7 @@ userstyles: color: yellow readme: app-link: https://picrew.me - current-maintainers: [*meowcelinee] + current-maintainers: [*Meowcelinee] pinterest: name: Pinterest categories: [photo_and_video, entertainment, social_networking] @@ -808,7 +745,7 @@ userstyles: color: green readme: app-link: https://planetminecraft.com - current-maintainers: [*nyameliaaaa] + current-maintainers: [*Nyameliaaaa] porkbun: name: Porkbun categories: [productivity] @@ -824,7 +761,7 @@ userstyles: readme: app-link: https://pronouns.cc current-maintainers: [*comfysage] - past-maintainers: [*neongamerbot] + past-maintainers: [*NeonGamerBot-QK] pronouns.page: name: Pronouns.page categories: [social_networking] @@ -903,7 +840,7 @@ userstyles: color: blue readme: app-link: https://github.com/searxng/searxng - current-maintainers: [*sekki21956, *ryanccn] + current-maintainers: [*Sekki21956, *ryanccn] seventv: name: 7TV categories: [entertainment, browser_extension] @@ -933,7 +870,7 @@ userstyles: color: green readme: app-link: https://open.spotify.com - current-maintainers: [*tnixc] + current-maintainers: [*Tnixc] stack-overflow: name: Stack Overflow categories: [discussion_forum, wiki] @@ -972,7 +909,7 @@ userstyles: readme: app-link: https://substack.com current-maintainers: [*uncenter] - past-maintainers: [*winston] + past-maintainers: [*nekowinston] syncthing: name: Syncthing categories: [file_manager, productivity] @@ -997,7 +934,7 @@ userstyles: readme: app-link: https://www.tldraw.com note: This theme only changes how the colors appear on the tldraw canvas. Exported graphics **will not be Catppuccin-themed**. - current-maintainers: [*genshibe, *uncenter] + current-maintainers: [*GenShibe, *uncenter] trinket: name: Trinket categories: [development] @@ -1061,7 +998,7 @@ userstyles: color: green readme: app-link: https://web.whatsapp.com - current-maintainers: [*francorav] + current-maintainers: [*FrancoRav] wikipedia: name: Wikipedia categories: [wiki, search_engine, productivity] @@ -1077,7 +1014,7 @@ userstyles: color: text readme: app-link: https://www.wikiwand.com - current-maintainers: [*tnixc] + current-maintainers: [*Tnixc] youtube: name: YouTube categories: [entertainment, social_networking, photo_and_video]