CI: validate pushes on every branch; a GitHub source names owner and repo alone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
42fcc20460
commit
99fcc774b4
4 files changed
+4
-2
No files matched your search
@@ -3,7 +3,6 @@ name: Catalog
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
schedule:
|
||||
# Mondays, 00:00 UTC.
|
||||
- cron: "0 0 * * 1"
|
||||
|
||||
@@ -45,7 +45,7 @@ apps/
|
||||
| `description` | At most 280 weighted characters, counted by [twitter-text](https://github.com/twitter/twitter-text): an address counts 23, CJK and emoji 2. |
|
||||
| `category` | `dev` (Developer Tools), `terminal` (Terminal & Network), `system` (System & Desktop) or `work` (Productivity & Media). |
|
||||
| `platforms` | Some of `macOS`, `Windows`, `Linux`, `Web`. |
|
||||
| `website`, `source` | Canonical `https` addresses with a plain host, or `null`. One at least. |
|
||||
| `website`, `source` | Canonical `https` addresses with a plain host, or `null`. One at least. A GitHub source is `https://github.com/owner/repo`, nothing after. |
|
||||
| `previews` | PNG file names in the folder. The first is the cover. |
|
||||
| `building` | Optional. `true` while the app is not out yet. |
|
||||
| `publishedAt` | ISO 8601 with a zone, such as `2026-10-04T12:00:00Z`: when the app joins the catalog. Maintainers confirm it; later updates keep it. |
|
||||
|
||||
@@ -126,6 +126,7 @@ function manifest(dir, id) {
|
||||
if (new Set(app.platforms).size !== app.platforms.length) fail(where, "platforms repeat");
|
||||
address(where, app.website, "website");
|
||||
address(where, app.source, "source");
|
||||
if (app.source && new URL(app.source).hostname === "github.com" && !github(app.source)) fail(where, `a GitHub source is https://github.com/owner/repo: ${app.source}`);
|
||||
if (app.website === null && app.source === null) fail(where, "website or source is required");
|
||||
if (!Array.isArray(app.previews) || !app.previews.length) fail(where, "previews must be a non-empty list");
|
||||
if (new Set(app.previews).size !== app.previews.length) fail(where, "previews repeat");
|
||||
|
||||
@@ -59,6 +59,8 @@ const bad = [
|
||||
["a zone past 59 minutes", { app: { ...good, publishedAt: "2026-10-04T00:00:00+01:60" } }, /with its zone/],
|
||||
["a day that does not exist", { app: { ...good, publishedAt: "2026-02-30T00:00:00Z" } }, /with its zone/],
|
||||
["an encoded host", { app: { ...good, website: "https://good.example@evil.com/" } }, /plain host/],
|
||||
["a GitHub source with a trailing slash", { app: { ...good, source: "https://github.com/ada/tally/" } }, /github.com\/owner\/repo/],
|
||||
["a GitHub source with a query", { app: { ...good, source: "https://github.com/ada/tally?tab=readme-ov-file" } }, /github.com\/owner\/repo/],
|
||||
["a host with credentials", { app: { ...good, website: "https://good.example@evil.com/" } }, /plain host/],
|
||||
["a long description", { app: { ...good, description: "a".repeat(281) } }, /281 weighted characters/],
|
||||
["stars without their time", { app: { ...good, stars: 3 } }, /go together/],
|
||||
|
||||
Reference in new issue
Block a user