Repository navigation
feat: add a ci-result check and stop repeating check names - #65
Open
aryanjasala wants to merge 4 commits into
Open
aryanjasala wants to merge 4 commits into
aryanjasala wants to merge 4 commits into
Conversation
wp-ci.yml gains a ci-result job, shown as "<caller job> / CI result": one stable check to require in branch protection. It needs every other job, runs even when they fail or are skipped, and fails if any of them failed or was cancelled, so a skipped job still counts as passing but a broken one does not. The leaves' job names no longer repeat the caller's: the test-php matrix job is "Test PHP <php>" or "Test PHP <php>, WP <wp>", and the build, artifact-gate, detect-changes and lint-php jobs drop their duplicated prefixes. No known caller requires a wp-ci check by name today; ci-result is the one to require from now on.
AGENTS.md now matches what this change does: a renamed job name is feat when a code search finds no caller requiring the old check, with that evidence in the PR body, and feat! otherwise. The README lists each old and new check name, and says that a calling job with its own if: reports no CI result when it is skipped.
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.
What this PR does
Gives branch protection one stable check to require,
<caller job> / CI result, and makes the other check names readable. Today a repository has to require individual leaf checks, whose names and count change withproject-type,skip, the PHP matrix and what a PR touched, and the names repeat themselves (CI / Lint PHP / Lint PHP,Test PHP (8.3, ) / PHPUnit).Closes
N/A
Changes
New
ci-resultjob inwp-ci.yml, shown as<caller job> / CI result. Itneedsevery job, runs onalways(), writes a table of every job's result to the job summary, and fails when any job failed, was cancelled or never started. A job skipped by its own gate (nothing it checks changed,skip, an opt-in left off) passes.The
test-phpmatrix job is namedTest PHP <php>orTest PHP <php>, WP <wp>instead of GitHub's defaultTest PHP (8.3, ).Leaf jobs that repeated their caller's name now say what they run:
ci-lint-php.ymlisPHPCS(orPHPCS + PHPStanwithenable-phpstan),ci-build.ymlisProduction build,ci-detect-changes.ymlisBucket changed files,ci-build-artifact-gate.ymlisCheck gated paths. SoCI / Lint PHP / Lint PHPreadsCI / Lint PHP / PHPCS + PHPStan.README: a Branch protection section saying to require
CI resultand nothing else.Docs for the renames (37a6a6b): the README's Branch protection section gains a "Renamed checks" table (old and new name per workflow) and a note that a calling job with its own
if:reports noCI resultwhen skipped.AGENTS.md's rule now says a renamed job name isfeat:when a code search finds no caller requiring the old check (with that evidence here), andfeat!:otherwise, which is the call this PR makes.How I verified
The
ci-resultstep run on its own with twoneedspayloads:I also checked who requires the current names: on 2026-10-29 none of icimod, theme-elementary, plugin-elementary, wp-primitives, wp-tooling or humanetics had a required check coming from
wp-ci.yml, so the renames break no branch protection today. Rechecked on 2026-11-06 across every caller code search finds (icimod, stepwise, theme-elementary, plugin-elementary, Anupkankale/imet-theme): none requires awp-cicheck; stepwise requires only its ownValidate PR title, and imet-theme's protection isn't readable from outside its org. That is why this isfeat, notfeat!: a!would make it v2, which@v1callers would never get.Acceptance criteria
Runtime behavior
CI resultfails on any failed, cancelled or never-started jobCI resultpasses when the remaining jobs were skipped by their own gatesCode quality
Housekeeping
CHANGELOG.mdedit: release-please writes it from the PR titleexamples/<workflow>.ymladded or updated to match any input change (no input changed)yamllint,actionlintandbin/check-workflows.shpass locallyReviewer notes
always(), not!cancelled(), on purpose. GitHub counts a skipped required check as passing. With!cancelled(), someone cancelling the run on a PR's head commit would leaveCI resultskipped and the PR mergeable with nothing checked. Withalways()a cancelled run fails the check.CI resultinstead.CI resultper unit (plugins/acme-blocks / CI result), which the README example shows.