Skip to content

Catalogue: open each listed mod's new release as a bump PR, hourly - #457

Open
AwsomeFox wants to merge 5 commits into
catalog/enginefrom
catalog/auto-update
Open

AwsomeFox wants to merge 5 commits into
catalog/enginefrom
catalog/auto-update

Conversation

@AwsomeFox

Copy link
Copy Markdown
Contributor

Removes the one hand step left in releasing a catalogued mod: opening the catalogue PR for each new version.

What it does

  • tools/catalog.py updates lists each catalogue entry whose own repo has a newer final release. It takes the zip named as the listed one (or <id>-<version>.zip / <id>-v<version>.zip), and skips versions in catalog/withdrawn.json and pre-releases.
  • --apply <id> downloads that zip and writes the entry from it, exactly as add does: signature checked, and the author key must stay the same.
  • .github/workflows/catalog-update.yml runs it hourly (and on demand). It opens one PR per version (catalog-update/<id>-<version>) with the catalogue app's token, so the Catalogue check runs on it, and the existing Catalogue auto-merge merges it if it only bumps the version. Anything else waits for a maintainer, as now.
    • A version whose branch already exists (open, or closed by a maintainer) isn't opened again.
    • A newer version closes the older version's PR.
  • Head units read the catalogue from main, so a merged bump reaches owners on their next catalogue check: no HMG-API release needed.
  • Docs: Making mods, mod reference, releasing.md.

Tested

  • tools/catalog-test.sh: all ok, with 13 new checks. They cover the newer final over a pre-release, withdrawn skipped, no matching zip, --apply giving an entry that bump accepts, a zip by another key refused, nothing newer, and version ranges as the engine reads them.
  • Dry run against the real catalogue (read-only): three entries are behind their releases today. They are adb 1.0.0 → 1.0.1, hmgapi-comfort 1.1.8 → 1.1.11 and wireless-carplay-aa 2.1.0 → 2.2.0. --apply adb on a scratch copy changed only version, download and sha256: a pure bump.
  • The workflow itself hasn't run yet: schedules only run from main. After merging, run it once from the Actions tab (workflow_dispatch). It should open those three PRs.

Needs the catalogue app (vars.CATALOG_APP_CLIENT_ID, secrets.CATALOG_APP_PRIVATE_KEY, already used by the auto-merge) to have contents and pull-requests write, which it has for the auto-merge.

On #423 (catalog/engine), for withdrawn.json.

🤖 Generated with Claude Code

tools/catalog.py updates lists each entry whose own repo has a newer final
release (the zip named as the listed one, or <id>-<version>.zip; withdrawn
versions skipped); --apply writes the entry from that zip, as add does.
The Catalogue updates workflow runs it hourly and opens one pull request per
version with the catalogue app's token, so the Catalogue check runs and the
existing auto-merge merges a pure bump. Authors no longer open a PR per
release, and head units see it on their next catalogue check (they read
main), with no HMG-API release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@VysseCodes VysseCodes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three workflow fixes:

  1. Branch match: the regex that closes older bump PRs, ^catalog-update/$id-[0-9], also matches a mod named <id>-2. Please match the exact id and a version (e.g. anchor the version part fully).
  2. Leftover files: files left untracked after a failed --apply get committed into the next PR's branch. Please add git clean -fdq catalog maps (or similar) before each mod.
  3. Token: gh pr list runs on GITHUB_TOKEN, which has no pull-requests permission here. Use the app token, or add pull-requests: read.

Merge order: after #423, before #458.

AwsomeFox and others added 2 commits November 30, 2026 16:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…token for listing PRs

Review:
- Older version PRs are closed only when the branch is catalog-update/<this id>-<x.y.z>
  exactly, so a mod named <id>-2 is never touched (checked in shell, not a regex).
- Each mod starts from a clean main (checkout -f, git clean catalog maps): nothing a failed
  --apply left behind gets into the next mod's PR.
- gh pr list uses the app token (GITHUB_TOKEN has no pull-requests permission here).
- The list is read on fd 3, so no command in the loop can consume it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AwsomeFox added a commit that referenced this pull request Nov 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AwsomeFox

Copy link
Copy Markdown
Contributor Author

All three done in 6571e50:

  1. Older version PRs are closed only for catalog-update/<this id>-<x.y.z> exactly. It's checked in shell, not a regex; tested against <id>-2-1.0.0, <id>bar-… and a partial version.
  2. Each mod starts from a clean main (git checkout -f origin/main && git clean -fdq catalog maps).
  3. gh pr list uses the app token.

The list is also read on its own fd, so nothing in the loop can consume it.

AwsomeFox and others added 2 commits December 2, 2026 11:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ase)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants