Add automated Terminus commands/releases data update - #10177
Open
EdwardAngert wants to merge 1 commit into
Open
Conversation
src/source/data/commands.json and terminusReleases.json (which power the <Commands /> and <Releases /> components on the Terminus docs) have been manually maintained and are currently stale: commands.json lags three releases behind and is missing three real commands, terminusReleases.json stops eight releases short of current. Adds a script that regenerates both files directly from the Terminus GitHub repo (a fresh terminus.phar's `list --format=json` output for commands, the releases API for changelog data — both already match the existing file schemas, no transform needed) and a workflow that runs it on a schedule, on demand, or via repository_dispatch from a future release hook in pantheon-systems/terminus, opening a PR only when the data actually changed. This PR adds the mechanism only. A follow-up PR applies it to refresh the current data. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
This was referenced Jul 23, 2026
|
Successfully created multidev environment: pr-10177 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/source/data/commands.jsonandterminusReleases.json(which power the<Commands />and<Releases />components on the Terminus docs pages) have been manually maintained and are currently stale —commands.jsonis three releases behind and missing real commands,terminusReleases.jsonstops eight releases short of current. Both files are just data dumps from the Terminus GitHub repo (a freshterminus.phar'slist --format=jsonoutput for commands, the releases API for changelog data) that already match the existing file schemas with no transform needed.This PR adds:
scripts/update-terminus-data.ts— regenerates both files from live Terminus data.github/workflows/update-terminus-data.yml— runs it on a schedule, on demand (workflow_dispatch), or via arepository_dispatchfrom a future release hook inpantheon-systems/terminus(inert until that hook exists)peter-evans/create-pull-request)This PR is the mechanism only — no data changes. It's the base of a 3-PR stack; #2 and #3 are opened against my fork for now since they depend on branches that only exist there, and will be re-targeted to this repo once this PR merges.
pantheon-systems/documentationmain←feature/terminus-data-update-automationEdwardAngert/pantheon-documentation(fork)feature/terminus-data-update-automation←chore/refresh-terminus-dataEdwardAngert/pantheon-documentation(fork)chore/refresh-terminus-data←content/terminus-audit-fixesHow to test
The script itself — needs PHP 8.2+ locally and
ghCLI authenticated (the script callsgh auth tokenautomatically ifGITHUB_TOKENisn't set):Downloads the latest
terminus.pharfrom GitHub releases, runsphp terminus.phar list --format=jsonforcommands.json, paginates the releases API forterminusReleases.json. Takes ~10-20 seconds.git diffshould show real changes if new Terminus releases have landed since this PR's data was last generated, or a clean no-op otherwise.The GitHub Actions workflow (exercises
setup-php,setup-node, andpeter-evans/create-pull-request— a separate concern from whether the script itself works):gh workflow run "Update Terminus reference data" --repo pantheon-systems/documentation --ref feature/terminus-data-update-automation, or trigger via the Actions tab UI (workflow_dispatch)act(brew install act) can run the workflow YAML in Docker as a dry runTest plan
tsc --noEmit --strict(zero errors)actionlint(zero findings)Built with docs-agent-plugin
🤖 Generated with Claude Code