Skip to content

Commit

Permalink
Merge branch 'main' into refactor/gmail-rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
uncenter authored Jun 5, 2024
2 parents a79d560 + 66b91b3 commit 095ecfc
Show file tree
Hide file tree
Showing 36 changed files with 1,782 additions and 671 deletions.
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/styles/chatgpt @uncenter
/styles/chatreplay @AnubisNekhet
/styles/chess.com @coldenate @isabelroses
/styles/cinny @jn-sena
/styles/codeberg @isabelroses
/styles/crates.io @uncenter
/styles/crowdin @ryanccn
Expand All @@ -24,11 +25,13 @@
/styles/google-drive @r58Playz
/styles/google-photos @GenShibe
/styles/graphite @isabelroses
/styles/hackage @jn-sena
/styles/hacker-news @lucasmelin
/styles/holodex @Guaxinim5573
/styles/home-manager-options-search @uncenter
/styles/homepage @Gandalf-the-Blue
/styles/hoppscotch @justTOBBI
/styles/hyperpipe @jn-sena
/styles/ichi.moe @watatomo
/styles/inoreader @thomas-philippot
/styles/instagram @GenShibe
Expand All @@ -53,14 +56,15 @@
/styles/paste.rs @Guaxinim5573
/styles/perplexity @isabelroses @Tnixc
/styles/picrew @Nyatalieeee
/styles/planet-minecraft @nyameliaaaa
/styles/planet-minecraft @temp-19382838
/styles/pronouns.page @uncenter
/styles/proton @soya-daizu
/styles/pypi @trinkey
/styles/quizlet @spaghettiosareyummy
/styles/searxng @Sekki21956 @ryanccn
/styles/snapchat-web @itzTheMeow
/styles/spotify-web @Tnixc
/styles/stack-overflow @uncenter
/styles/skiff @coopw1
/styles/stylus @GitMuslim
/styles/syncthing @BlankParticle
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/userstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
label: What userstyles are you seeing the problem on?
description: "Don't worry about the `lbl:` prefix, it allows issues to be automatically labeled!"
multiple: true
options: ["lbl:advent-of-code", "lbl:anilist", "lbl:arch-wiki", "lbl:boringproxy", "lbl:brave-search", "lbl:bsky", "lbl:bstats", "lbl:canvas-lms", "lbl:chatgpt", "lbl:chatreplay", "lbl:chess.com", "lbl:cinny", "lbl:codeberg", "lbl:crates.io", "lbl:crowdin", "lbl:deepl", "lbl:docs.rs", "lbl:duckduckgo", "lbl:ecosia", "lbl:elk", "lbl:freedesktop", "lbl:formative", "lbl:github", "lbl:gmail", "lbl:google", "lbl:google-drive", "lbl:google-photos", "lbl:graphite", "lbl:hackage", "lbl:hacker-news", "lbl:holodex", "lbl:home-manager-options-search", "lbl:homepage", "lbl:hoppscotch", "lbl:hyperpipe", "lbl:ichi.moe", "lbl:inoreader", "lbl:instagram", "lbl:invidious", "lbl:invokeai", "lbl:keyoxide", "lbl:lastfm", "lbl:lemmy", "lbl:libreddit", "lbl:lichess", "lbl:lingva", "lbl:linkedin", "lbl:mastodon", "lbl:mdbook", "lbl:mdn", "lbl:modrinth", "lbl:microsoft-word", "lbl:migadu-webmail", "lbl:minesweeper", "lbl:nitter", "lbl:nixos-search", "lbl:nixos.wiki", "lbl:npm", "lbl:openmediavault", "lbl:paste.rs", "lbl:perplexity", "lbl:picrew", "lbl:pinterest", "lbl:planet-minecraft", "lbl:pronouns.page", "lbl:proton", "lbl:pypi", "lbl:quizlet", "lbl:reddit", "lbl:searxng", "lbl:snapchat-web", "lbl:spotify-web", "lbl:startpage", "lbl:skiff", "lbl:stylus", "lbl:substack", "lbl:syncthing", "lbl:tabnews", "lbl:tldraw", "lbl:trinket", "lbl:tuta", "lbl:twitch", "lbl:twitter", "lbl:vercel", "lbl:whatsapp-web", "lbl:wikipedia", "lbl:wikiwand", "lbl:youtube", "lbl:nextjs"]
options: ["lbl:advent-of-code", "lbl:anilist", "lbl:arch-wiki", "lbl:boringproxy", "lbl:brave-search", "lbl:bsky", "lbl:bstats", "lbl:canvas-lms", "lbl:chatgpt", "lbl:chatreplay", "lbl:chess.com", "lbl:cinny", "lbl:codeberg", "lbl:crates.io", "lbl:crowdin", "lbl:deepl", "lbl:docs.rs", "lbl:duckduckgo", "lbl:ecosia", "lbl:elk", "lbl:freedesktop", "lbl:formative", "lbl:github", "lbl:gmail", "lbl:google", "lbl:google-drive", "lbl:google-photos", "lbl:graphite", "lbl:hackage", "lbl:hacker-news", "lbl:holodex", "lbl:home-manager-options-search", "lbl:homepage", "lbl:hoppscotch", "lbl:hyperpipe", "lbl:ichi.moe", "lbl:inoreader", "lbl:instagram", "lbl:invidious", "lbl:invokeai", "lbl:keyoxide", "lbl:lastfm", "lbl:lemmy", "lbl:libreddit", "lbl:lichess", "lbl:lingva", "lbl:linkedin", "lbl:mastodon", "lbl:mdbook", "lbl:mdn", "lbl:modrinth", "lbl:microsoft-word", "lbl:migadu-webmail", "lbl:minesweeper", "lbl:nitter", "lbl:nixos-search", "lbl:nixos.wiki", "lbl:npm", "lbl:openmediavault", "lbl:paste.rs", "lbl:perplexity", "lbl:picrew", "lbl:pinterest", "lbl:planet-minecraft", "lbl:pronouns.page", "lbl:proton", "lbl:pypi", "lbl:quizlet", "lbl:reddit", "lbl:searxng", "lbl:snapchat-web", "lbl:spotify-web", "lbl:stack-overflow", "lbl:startpage", "lbl:skiff", "lbl:stylus", "lbl:substack", "lbl:syncthing", "lbl:tabnews", "lbl:tldraw", "lbl:trinket", "lbl:tuta", "lbl:twitch", "lbl:twitter", "lbl:vercel", "lbl:whatsapp-web", "lbl:wikipedia", "lbl:wikiwand", "lbl:youtube", "lbl:nextjs"]
validations:
required: true
- type: textarea
Expand Down
2 changes: 2 additions & 0 deletions .github/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ snapchat-web:
- '(lbl:snapchat-web)'
spotify-web:
- '(lbl:spotify-web)'
stack-overflow:
- '(lbl:stack-overflow)'
startpage:
- '(lbl:startpage)'
skiff:
Expand Down
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
- name: spotify-web
description: Spotify Web
color: '#a6da95'
- name: stack-overflow
description: Stack Overflow
color: '#f5a97f'
- name: startpage
description: Startpage
color: '#b7bdf8'
Expand Down
1 change: 1 addition & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ reddit: styles/reddit/**/*
searxng: styles/searxng/**/*
snapchat-web: styles/snapchat-web/**/*
spotify-web: styles/spotify-web/**/*
stack-overflow: styles/stack-overflow/**/*
startpage: styles/startpage/**/*
skiff: styles/skiff/**/*
stylus: styles/stylus/**/*
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ See [CONTRIBUTING.md](docs/CONTRIBUTING.md).
- [freedesktop.org](styles/freedesktop)
- [GitHub](styles/github)
- [Graphite](styles/graphite)
- 🚧 [Hackage](styles/hackage)
- [Hackage](styles/hackage)
- [Home Manager Options Search](styles/home-manager-options-search)
- [Hoppscotch](styles/hoppscotch)
- [Keyoxide](styles/keyoxide)
Expand All @@ -108,6 +108,7 @@ See [CONTRIBUTING.md](docs/CONTRIBUTING.md).
- [npm](styles/npm)
- [paste.rs](styles/paste.rs)
- [PyPI](styles/pypi)
- [Stack Overflow](styles/stack-overflow)
- [Trinket](styles/trinket)
- [Vercel](styles/vercel)

Expand Down Expand Up @@ -153,7 +154,7 @@ See [CONTRIBUTING.md](docs/CONTRIBUTING.md).
<details open>
<summary>🎵 Music</summary>

- 🚧 [Hyperpipe](styles/hyperpipe)
- [Hyperpipe](styles/hyperpipe)
- [Last.fm](styles/lastfm)
- [Spotify Web](styles/spotify-web)

Expand Down Expand Up @@ -193,7 +194,7 @@ See [CONTRIBUTING.md](docs/CONTRIBUTING.md).
<summary>✨ Social Networking</summary>

- [Bluesky Social](styles/bsky)
- 🚧 [Cinny](styles/cinny)
- [Cinny](styles/cinny)
- [Elk](styles/elk)
- [Instagram](styles/instagram)
- [LinkedIn](styles/linkedin)
Expand Down
18 changes: 9 additions & 9 deletions docs/userstylesyml.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ on the schema. Please refer to it for clarification.
color: <color>
readme:
app-link: <url>
current-maintainers: [*<github-username>]
current-maintainers: [*<github-username>]
```
`All Fields:`
Expand Down Expand Up @@ -75,8 +75,8 @@ on the schema. Please refer to it for clarification.
faq: # OPTIONAL
- question: <question>
answer: <answer>
current-maintainers: [*<github-username>]
past-maintainers: [*<github-username>] # OPTIONAL
current-maintainers: [*<github-username>]
past-maintainers: [*<github-username>] # OPTIONAL
```

### Adding yourself as a maintainer
Expand Down Expand Up @@ -106,8 +106,8 @@ userstyles:
color: red
readme:
app-link: "https://youtube.com"
current-maintainers: [*isabelroses, *your-username]
past-maintainers: [*elkrien]
current-maintainers: [*isabelroses, *your-username]
past-maintainers: [*elkrien]
```

If the change is accepted, you will receive an invitation to the `catppuccin` organization,
Expand All @@ -132,10 +132,10 @@ userstyles:
color: red
readme:
app-link: "https://youtube.com"
- current-maintainers: [*isabelroses, *elkrien]
- past-maintainers: []
+ current-maintainers: [*isabelroses]
+ past-maintainers: [*elkrien]
- current-maintainers: [*isabelroses, *elkrien]
- past-maintainers: []
+ current-maintainers: [*isabelroses]
+ past-maintainers: [*elkrien]
If you would not like to be listed as a past maintainer, you can remove yourself from
`collaborators` array entirely. Upon removal, you will also be removed from the
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ await syncIssueLabels(userstylesData.userstyles);
await updateFile(
join(REPO_ROOT, ".github/CODEOWNERS"),
Object.entries(userstylesData.userstyles)
.filter(([_, { readme }]) => readme["current-maintainers"].length > 0)
.map(([slug, { readme }]) => {
const currentMaintainers = readme["current-maintainers"]
.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} ${currentMaintainers}`;
return `/styles/${slug} ${codeOwners}`;
})
.join("\n"),
);
4 changes: 2 additions & 2 deletions scripts/generate/readme-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const generateMainReadme = async (
return {
emoji: meta.emoji,
name: meta.name,
ports: ports.map(({ name, path, readme }) => {
ports: ports.map(({ name, path, "current-maintainers": currentMaintainers }) => {
return {
name: [name].flat(),
maintained: readme["current-maintainers"].length > 0,
maintained: currentMaintainers.length > 0,
path,
};
}),
Expand Down
6 changes: 3 additions & 3 deletions scripts/generate/readme-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ export const generateStyleReadmes = (
);
const stylesReadmeContent = Deno.readTextFileSync(stylesReadmePath);

Object.entries(userstyles).map(([slug, { name, readme }]) => {
Object.entries(userstyles).map(([slug, { name, readme, "current-maintainers": currentMaintainers, "past-maintainers": pastMaintainers }]) => {
console.log(`Generating README for ${slug}`);
const readmeContent = Handlebars.compile(stylesReadmeContent)({
heading: heading(name, readme["app-link"]),
slug,
usage: readme.usage,
faq: readme.faq,
collaborators: {
currentMaintainers: extractName(readme["current-maintainers"]),
pastMaintainers: extractName(readme["past-maintainers"]),
currentMaintainers: extractName(currentMaintainers),
pastMaintainers: extractName(pastMaintainers),
},
});
Deno.writeTextFile(
Expand Down
2 changes: 1 addition & 1 deletion scripts/sync-maintainers/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const maintainers = [
Object.values(userstyles).flatMap((
style: UserStylesSchema.Userstyle,
) =>
style.readme["current-maintainers"].map((m) => {
style["current-maintainers"].map((m) => {
const username = m.url.split("github.com/")?.pop();
// Check that they follow github.com/username pattern.
assert.assertExists(username);
Expand Down
6 changes: 3 additions & 3 deletions scripts/types/userstyles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export type CurrentMaintainers = {
[k: string]: unknown;
}[];
/**
* List of all maintainers that have maintained on this userstyle in the past.
* List of all users that have maintained this userstyle in the past.
*
* @minItems 1
*/
Expand Down Expand Up @@ -176,6 +176,8 @@ export interface Userstyle {
color: Color;
icon?: Icon;
readme: README;
"current-maintainers": CurrentMaintainers;
"past-maintainers"?: PastMaintainers;
}
/**
* Options to help in the auto-generation of the userstyle README.
Expand All @@ -184,7 +186,5 @@ export interface README {
"app-link": ApplicationLink;
usage?: Usage;
faq?: FAQ;
"current-maintainers": CurrentMaintainers;
"past-maintainers"?: PastMaintainers;
[k: string]: unknown;
}
36 changes: 18 additions & 18 deletions scripts/userstyles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "object",
"description": "The directory of the userstyle.",
"examples": ["youtube"],
"required": ["name", "categories", "readme", "color"],
"required": ["name", "categories", "readme", "color", "current-maintainers"],
"additionalProperties": false,
"properties": {
"name": {
Expand Down Expand Up @@ -79,7 +79,7 @@
"title": "README",
"description": "Options to help in the auto-generation of the userstyle README.",
"type": "object",
"required": ["app-link", "current-maintainers"],
"required": ["app-link"],
"properties": {
"app-link": {
"$id": "#userstyles/userstyle/readme/app-link",
Expand Down Expand Up @@ -130,23 +130,23 @@
},
"required": ["question", "answer"]
}
},
"current-maintainers": {
"$id": "#userstyles/userstyle/readme/current-maintainers",
"title": "Current Maintainers",
"description": "List of all active maintainers for this userstyle.",
"type": "array",
"$ref": "#/$defs/collaborators"
},
"past-maintainers": {
"$id": "#userstyles/userstyle/readme/past-maintainers",
"title": "Past Maintainers",
"type":"array",
"minItems": 1,
"description": "List of all maintainers that have maintained on this userstyle in the past.",
"$ref": "#/$defs/collaborators"
}
}
},
"current-maintainers": {
"$id": "#userstyles/userstyle/current-maintainers",
"title": "Current Maintainers",
"description": "List of all active maintainers for this userstyle.",
"type": "array",
"$ref": "#/$defs/collaborators"
},
"past-maintainers": {
"$id": "#userstyles/userstyle/past-maintainers",
"title": "Past Maintainers",
"type": "array",
"minItems": 1,
"description": "List of all users that have maintained this userstyle in the past.",
"$ref": "#/$defs/collaborators"
}
}
}
Expand Down Expand Up @@ -182,7 +182,7 @@
"required": ["url"]
}
},
"categories": {
"categories": {
"$id": "#categories",
"type": "array",
"minItems": 1,
Expand Down
Loading

0 comments on commit 095ecfc

Please sign in to comment.