Skip to content

Commit 7446054

Browse files
[docs] Clarify changelog workflow permissions (#118) (#120)
* [docs] Clarify changelog workflow permissions (#118) * Update wiki submodule pointer for PR #120 * [changelog] Add release workflow permissions note (#118) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 739812a commit 7446054

6 files changed

Lines changed: 61 additions & 4 deletions

File tree

.github/wiki

Submodule wiki updated from ad89cff to 1dbc52c

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+
### Changed
11+
12+
- Document required GitHub Actions permissions for changelog release automation (#118)
13+
1014
## [1.12.0] - 2026-04-19
1115

1216
### Added

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ changelog automation for pull-request validation and release preparation, so
170170
consumer repositories can adopt the same changelog-driven release flow without
171171
copying workflow logic by hand.
172172

173+
The release workflow is intentionally two-step: `workflow_dispatch` prepares a
174+
`release/v...` pull request, and merging that release pull request publishes
175+
the GitHub release and tag. Consumer repositories must enable GitHub Actions
176+
**Read and write permissions** and **Allow GitHub Actions to create and approve
177+
pull requests** under `Settings -> Actions -> General`. If those controls are
178+
disabled, an organization or repository admin must unlock them before the
179+
release-preparation workflow can create pull requests.
180+
173181
This repository also keeps role-based project agents in `.agents/agents`. They
174182
are mirrored through `.github/agents` for GitHub-oriented discovery, while the
175183
packaged `.agents/skills` directory remains the consumer-facing procedural

docs/configuration/repository-setup.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,21 @@ Once this is done, the wiki can be cloned as a submodule and synchronized by the
3838
Workflow Permissions
3939
--------------------
4040

41-
GitHub Actions must have permission to push changes to your repository (for Wiki updates and GitHub Pages deployments).
41+
GitHub Actions must have permission to push changes to your repository and, for
42+
the changelog release flow, to open release-preparation pull requests.
4243

4344
1. Go to **Settings** > **Actions** > **General**.
4445
2. Scroll down to **Workflow permissions**.
4546
3. Select **Read and write permissions**.
46-
4. Click **Save**.
47+
4. Enable **Allow GitHub Actions to create and approve pull requests**.
48+
5. Click **Save**.
4749

4850
.. warning::
49-
Without these permissions, the ``wiki.yml`` and ``reports.yml`` workflows will fail when attempting to deploy content.
51+
Without these permissions, the ``wiki.yml`` and ``reports.yml`` workflows will fail when attempting to deploy content, and the ``changelog.yml`` workflow will fail when trying to open a ``release/v...`` pull request.
52+
53+
.. note::
54+
If the permission controls are disabled or grayed out, the repository is
55+
usually constrained by organization policy or by missing admin access. This
56+
is separate from branch protection. Branch protection affects whether the
57+
generated release pull request can be merged, while workflow permissions
58+
affect whether GitHub Actions can create that pull request at all.

docs/internals/release-publishing.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ The expected flow is:
5151
6. let the merged release workflow create or update the GitHub release and tag from the released changelog section;
5252
7. confirm Packagist, reports, and wiki publication.
5353

54+
This means an ordinary feature or bug-fix pull request merged into ``main``
55+
does **not** publish a GitHub release by itself. Publication happens only after
56+
the dedicated ``release/v...`` pull request created by the changelog workflow
57+
is merged.
58+
5459
Do not retag an existing published version. If a release needs correction,
5560
prepare a follow-up changelog entry, open a new release-preparation pull
5661
request, and publish a new version tag.
@@ -113,6 +118,26 @@ matching released changelog section. Those notes SHOULD include:
113118
- documentation and workflow changes that affect consumer repositories;
114119
- verification performed before the release.
115120

121+
Workflow Permissions
122+
--------------------
123+
124+
The manual release-preparation step depends on GitHub Actions being allowed to
125+
open pull requests on behalf of the repository workflow token.
126+
127+
Configure the repository under **Settings** > **Actions** > **General**:
128+
129+
1. enable **Read and write permissions** under **Workflow permissions**;
130+
2. enable **Allow GitHub Actions to create and approve pull requests**.
131+
132+
If either control appears disabled or grayed out, the restriction is usually
133+
coming from repository permissions or organization policy rather than branch
134+
protection. In that case, an organization or repository administrator MUST
135+
adjust the policy before the workflow can prepare release pull requests.
136+
137+
Branch protection matters later, when the generated ``release/v...`` pull
138+
request is reviewed and merged, but it does not control whether the workflow is
139+
allowed to create that pull request in the first place.
140+
116141
Packagist Publication
117142
---------------------
118143

docs/usage/github-actions.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,27 @@ wrapper in ``resources/github-actions/changelog.yml``.
100100
* Writes a release-notes preview file to ``.dev-tools/release-notes.md`` with
101101
``composer dev-tools changelog:show -- <version>``.
102102
* Opens or updates a release-preparation pull request instead of committing directly to ``main``.
103+
* Requires repository Actions permissions that allow the workflow token to create pull requests.
103104
* **Merged Release Pull Requests**:
104105
* Detects merged branches that match the configured release branch prefix.
105106
* Renders the released changelog section with ``composer dev-tools changelog:show -- <version>``.
106107
* Creates or updates the Git tag and GitHub release with the rendered changelog section as the release body.
108+
* Does **not** run for ordinary feature or fix pull requests merged into ``main``.
107109

108110
**Inputs:**
109111
* ``changelog-file``: managed changelog path, default ``CHANGELOG.md``.
110112
* ``version``: optional explicit version for manual release preparation.
111113
* ``release-branch-prefix``: release branch prefix, default ``release/v``.
112114

115+
**Repository prerequisites:**
116+
* Go to **Settings** > **Actions** > **General**.
117+
* Under **Workflow permissions**, enable **Read and write permissions**.
118+
* Enable **Allow GitHub Actions to create and approve pull requests**.
119+
* 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.
120+
121+
.. note::
122+
Branch protection is not what blocks the release-preparation workflow from opening a pull request. Branch protection affects the merge of the ``release/v...`` pull request later in the flow. The gray or disabled workflow-permission controls come from repository permissions or organization policy.
123+
113124
Maintenance Workflows
114125
---------------------
115126

0 commit comments

Comments
 (0)