Skip to content

Commit e019c73

Browse files
committed
docs: require stable changelog validation context for branch protection
1 parent 791e543 commit e019c73

4 files changed

Lines changed: 36 additions & 19 deletions

File tree

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,14 @@ next semantic version from pending changes, `changelog:promote` publishes the
178178
current `Unreleased` section into a tagged version, and `changelog:show`
179179
renders one published section for GitHub release notes.
180180
Repositories that require changelog enforcement in branch protection should
181-
require the workflow aggregate `Changelog Validation` context. It remains
182-
stable for normal pull requests and release-preparation branches, while the
183-
lower-level validation job can be skipped intentionally for `release/v...`
184-
branches.
181+
require the aggregate changelog check:
182+
183+
- Direct workflow invocation: `Changelog Validation`
184+
- Reusable workflow wrappers (`resources/github-actions/changelog.yml`): `changelog / Changelog Validation`
185+
186+
This remains stable for normal pull requests and release-preparation branches,
187+
while the lower-level validation job can be skipped intentionally for
188+
`release/v...` branches.
185189

186190
Structured output is available across the DevTools command surface through
187191
`--json`, which returns deterministic `message` / `level` / `context` payloads

docs/advanced/branch-protection-and-bot-commits.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,13 @@ enabled. The dispatched run publishes the same required ``Run Tests`` contexts
134134
for the release PR head, which lets branch protection evaluate the final
135135
workflow-managed release commit without a maintainer bypass.
136136

137-
Changelog validation has its own branch-protection-safe aggregate context. Use
138-
``Changelog Validation`` as the required check instead of the internal
139-
``Validate PR Changelog`` job. The internal validation job is skipped for
140-
``release/v...`` branches by design, while the aggregate job still reports
141-
success for release-preparation pull requests and failure for normal pull
142-
requests whose changelog validation did not pass.
137+
Changelog validation has its own branch-protection-safe aggregate context.
138+
For direct workflow runs, use ``Changelog Validation``. For consumers of the
139+
reusable workflow wrapper, use the namespaced check name ``changelog / Changelog
140+
Validation`` instead of the internal ``changelog / Validate PR Changelog`` job.
141+
The internal validation job is skipped for ``release/v...`` branches by design, while
142+
the aggregate job still reports success for release-preparation pull requests and
143+
failure for normal pull requests whose changelog validation did not pass.
143144

144145
At a high level, the workflows need permission to read repository contents,
145146
write generated preview commits, update pull request comments, and publish Pages

docs/internals/release-publishing.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,14 @@ branch and fail when no meaningful ``Unreleased`` entry is added. Generated
101101
``release/v...`` pull requests are excluded from that validation because the
102102
release-preparation flow intentionally empties ``Unreleased`` after promotion.
103103
Repositories that protect merges SHOULD require the workflow's aggregate
104-
``Changelog Validation`` context. That context fails when a normal pull request
105-
does not pass changelog validation and succeeds for release-preparation
106-
branches where the internal validation job is intentionally skipped.
104+
changelog context:
105+
106+
- Direct workflow invocation: ``Changelog Validation``
107+
- Reusable workflow wrapper invocation: ``changelog / Changelog Validation``
108+
109+
That context fails when a normal pull request does not pass changelog
110+
validation and succeeds for release-preparation branches where the internal
111+
validation job is intentionally skipped.
107112

108113
If maintainers must recover the release manually, create the tag from the
109114
verified ``main`` commit:

docs/usage/github-actions.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ wrapper in ``resources/github-actions/changelog.yml``.
168168
* Runs ``composer dev-tools changelog:check -- --against=<base-ref>`` against the base ref.
169169
* Fails when a normal non-release branch does not add a meaningful ``Unreleased`` change.
170170
* Skips the validation job for pull requests whose head branch matches the configured ``release-branch-prefix``, because release-preparation branches intentionally leave ``Unreleased`` empty after promotion.
171-
* Publishes the aggregate ``Changelog Validation`` job for every active
172-
pull request. This is the branch-protection-safe context to require:
173-
it fails when normal changelog validation fails and succeeds for
174-
release-preparation branches where validation is intentionally skipped.
171+
* Publishes the aggregate changelog check for every active pull request.
172+
Direct workflow invocation uses ``Changelog Validation``; reusable
173+
workflow consumers typically expose it namespaced as
174+
``changelog / Changelog Validation``. This is the branch-protection-safe
175+
context to require: it fails when normal changelog validation fails and
176+
succeeds for release-preparation branches where validation is
177+
intentionally skipped.
175178
* Appends a run summary with the compared base ref and changelog file.
176179
* **Manual Release Preparation**:
177180
* Checks out the repository default branch with full history.
@@ -204,8 +207,12 @@ wrapper in ``resources/github-actions/changelog.yml``.
204207
* Under **Workflow permissions**, enable **Read and write permissions**.
205208
* Enable **Allow GitHub Actions to create and approve pull requests**.
206209
* If either control is disabled or grayed out, the repository is likely constrained by organization-level policy or missing admin permission. In that case, an organization or repository admin must unlock the setting before manual release preparation can open a release pull request.
207-
* In branch protection, require the changelog workflow's ``Changelog
208-
Validation`` context instead of the internal ``Validate PR Changelog`` job.
210+
* In branch protection, require the changelog workflow's aggregate context:
211+
212+
- Direct workflow invocation: ``Changelog Validation``
213+
- Reusable workflow wrapper invocation: ``changelog / Changelog Validation``
214+
215+
Use this instead of the internal ``changelog / Validate PR Changelog`` job.
209216
The internal job is intentionally skipped for release-preparation branches,
210217
while the aggregate context stays stable for normal and release pull
211218
requests.

0 commit comments

Comments
 (0)