Repository navigation
Conversation
Poll the WordPress version check API once a day. When a new WordPress version becomes the latest stable release, readme.txt still names an older version, and the matching wp/X.Y branch exists, open a pull request against trunk that bumps the "Tested up to" field. The pull request is opened with the release app token so CI runs on it. A branch-existence guard keeps the workflow from opening the same pull request twice, and the readme value may run ahead of the API without triggering anything, since it can legitimately name an upcoming release.
Add an informational job to the release workflow that compares the "Tested up to" field in readme.txt with the latest stable WordPress version from the version check API. When readme.txt names an older version, the run shows a warning annotation telling the releaser to merge the pending bump pull request first. The job is deliberately incapable of disrupting a release: no other job depends on it and it runs with continue-on-error, so even a broken check only shows as an annotation.
This reverts commit 10c4927.
Apply the review findings to the scheduled bump workflow: - Skip scheduled runs on forks, which have no app credentials. - Run the check first against a sparse checkout of readme.txt, and only mint the write-scoped app token when there is something to push. - Deduplicate on the pull request record instead of branch existence, so a closed pull request counts as a human decision and a leftover branch from an interrupted run is overwritten instead of blocking forever. - Distinguish a missing ref (exit code 2) from an infrastructure failure in the ls-remote guard, so outages fail loudly instead of reading as "branch missing". - Apply labels on gh pr create so a labeling failure is loud, instead of a swallowed gh pr edit that would trip the label enforcement check. - Pipe curl into jq, removing the versions.json temp file that survived a parse failure in the working tree. - Cross-reference the stable-check query (unit-test.yml) and the readme parser (getTestedUpToMajor in resolve-performance-branches.mjs) that must stay in sync with this file. - Reword the pull request body: merging is the compatibility attestation, and the REFERENCE_COMMIT update that performance.md requires for every "Tested up to" change is named as a merge prerequisite.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
Replace the sed extraction of the "Tested up to" value with the unit-tested getTestedUpToMajor() from the performance branch resolver, so the workflow that writes the line and the resolver that reads it share one parser. The module imports cleanly on a bare runner (Node builtins only, no install, no side effects), and it throws on a malformed line, failing the step with a clear error instead of an empty-string fallback. Add tools/release to the sparse checkout and anchor both patterns so readme.txt files deeper in the tree are not materialized.
|
Maybe we should keep this process manual; we also do a lot of cleanup after bumping versions, which might be hard to automate - #82404. |
|
Fair enough. The bump was missed in the last release: https://wordpress.org/support/topic/latest-version-of-gutenberg-2/ Maybe there could just be a non-blocking check with warnings when building the RC instead? Happy to close this, was just a YOLO experiment Thanks! |
|
Maybe we should add this as a post-release task for someone who will handle the plugin after the WP release. IMO, it's fine if version bumps happen a week or two later. |
What
A daily scheduled workflow that opens a pull request bumping the
Tested up tofield inreadme.txtwhen a new WordPress version becomes the latest stable release.Why
The field only changes today inside the manual "bump minimum required WordPress version" chore, which lands weeks after the WordPress release. In between, nothing notices the gap: the performance workflow reads the field on every trunk push and release, so a stale value quietly pins those runs to the old
wp/X.Ybranch. Right now the version check API already reports 7.1 whilereadme.txtsays 7.0, so the first run after merge will open the 7.1 bump.What changed
bump-tested-up-to.ymlworkflow: daily cron plus manual dispatch, restricted toWordPress/gutenberg.readme.txtwith no credentials. The write-scoped app token is only minted when there is something to push, and the app-created pull request triggers CI (the defaultGITHUB_TOKENwould not).readme.txtmay legitimately run ahead of the API (it can name an upcoming release), so only an older value triggers a bump, and only once thewp/X.Ybranch exists.REFERENCE_COMMITupdate thatdocs/explanations/architecture/performance.mdrequires for everyTested up tochange.Manual testing
The workflow only runs on
WordPress/gutenberg, so exercise the check logic locally:curl -sf https://api.wordpress.org/core/stable-check/1.0/ | jq -r 'with_entries(select(.value=="latest"))|keys[]' | cut -d. -f1,2and note it prints7.1whilereadme.txtsaysTested up to: 7.0.git ls-remote --exit-code --heads origin wp/7.1and confirm it exits 0.gh pr list --head update/tested-up-to-7.1 --state alland confirm it is empty, meaning a scheduled run today would open the 7.1 bump pull request.Notes
build-plugin-zip.ymlwas drafted and reverted on this branch to keep concerns separate. It can follow as its own pull request.