Skip to content

Commit cc4ebb5

Browse files
Fix release PR required checks (#256)
* fix: dispatch release pull request checks * Update wiki submodule pointer for PR #256 --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b7bb6b2 commit cc4ebb5

6 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/wiki

Submodule wiki updated from a9b3b74 to 781af55

.github/workflows/changelog.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ on:
5151
types: [closed]
5252

5353
permissions:
54+
actions: write
5455
contents: write
5556
pull-requests: write
5657
repository-projects: write
@@ -220,6 +221,13 @@ jobs:
220221
221222
- source: `${{ steps.version.outputs.source }}`
222223
224+
- name: Dispatch required tests for release pull request
225+
if: ${{ steps.create_pr.outputs.pull-request-number != '' }}
226+
env:
227+
GH_TOKEN: ${{ github.token }}
228+
RELEASE_BRANCH: ${{ env.RELEASE_BRANCH_PREFIX }}${{ steps.version.outputs.value }}
229+
run: gh workflow run tests.yml --ref "${RELEASE_BRANCH}" -f max-outdated=-1 -f publish-required-statuses=true
230+
223231
- uses: actions/checkout@v6
224232
- name: Checkout dev-tools workflow action source
225233
uses: actions/checkout@v6
@@ -246,6 +254,7 @@ jobs:
246254
- Version source: `${{ steps.version.outputs.source }}`
247255
- Pull request operation: `${{ steps.create_pr.outputs.pull-request-operation || 'none' }}`
248256
- Pull request URL: ${{ steps.create_pr.outputs.pull-request-url || 'not created' }}
257+
- Required test dispatch: `${{ steps.create_pr.outputs.pull-request-number != '' && 'requested' || 'not needed' }}`
249258
250259
publish_merged_release:
251260
name: Publish Merged Release

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Dispatch required test status mirroring after changelog release-preparation workflows create or update release pull requests so release branches no longer require branch-protection bypass for workflow-authored commits (#250)
13+
1014
## [1.22.1] - 2026-04-24
1115

1216
### Fixed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ also pushed with the built-in workflow token, the workflow dispatches
125125
``tests.yml`` for the refreshed branch after a successful push so required test
126126
statuses can be reported for the new commit.
127127

128+
Release-preparation pull requests follow the same rule. The changelog workflow
129+
creates or updates ``release/v...`` branches with the built-in workflow token,
130+
so GitHub does not start ordinary ``pull_request`` test runs for the new release
131+
commit. After the release pull request exists, the changelog workflow
132+
dispatches ``tests.yml`` for the release branch with required-status mirroring
133+
enabled. The dispatched run publishes the same required ``Run Tests`` contexts
134+
for the release PR head, which lets branch protection evaluate the final
135+
workflow-managed release commit without a maintainer bypass.
136+
128137
At a high level, the workflows need permission to read repository contents,
129138
write generated preview commits, update pull request comments, and publish Pages
130139
content. Keep those permissions scoped to the workflow jobs that actually need
@@ -187,6 +196,9 @@ workflow MAY fall back to the first organization Project V2 when no explicit
187196
project number is provided. The reusable project-board helpers now live under
188197
``.github/actions/project-board/*``, which keeps project-state transitions
189198
shared across issue, pull-request, review, changelog, and release workflows.
199+
Consumer changelog wrappers MUST also grant ``actions: write`` so the reusable
200+
release-preparation workflow can dispatch ``tests.yml`` after creating or
201+
updating a release pull request.
190202

191203
Resolving ``.github/wiki`` Pointer Conflicts
192204
--------------------------------------------

docs/usage/github-actions.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,13 @@ wrapper in ``resources/github-actions/changelog.yml``.
176176
* Writes a release-notes preview file to ``.dev-tools/release-notes.md`` with
177177
``composer dev-tools changelog:show -- <version>``.
178178
* Opens or updates a release-preparation pull request instead of committing directly to ``main``.
179+
* Dispatches ``tests.yml`` for the release branch with required-status
180+
mirroring enabled, because release branches are written by the workflow
181+
token and do not receive ordinary ``pull_request`` test runs
182+
automatically.
179183
* Appends a run summary with the resolved version, version source, and pull-request URL.
180-
* Requires repository Actions permissions that allow the workflow token to create pull requests.
184+
* Requires repository Actions permissions that allow the workflow token
185+
to create pull requests and dispatch workflows.
181186
* **Merged Release Pull Requests**:
182187
* Detects merged branches that match the configured release branch prefix.
183188
* Renders the released changelog section with ``composer dev-tools changelog:show -- <version>``.

resources/github-actions/changelog.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
default: release/v
3030

3131
permissions:
32+
actions: write
3233
contents: write
3334
pull-requests: write
3435
repository-projects: write

0 commit comments

Comments
 (0)