diff --git a/.changelog/release-pr-version-range.md b/.changelog/release-pr-version-range.md new file mode 100644 index 000000000..edea00983 --- /dev/null +++ b/.changelog/release-pr-version-range.md @@ -0,0 +1,6 @@ +--- +category: changed +type: patch +--- + +Shows the current and next versions in automatically prepared release pull request titles. diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 991c29b3b..2dfde9a26 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -28,6 +28,7 @@ jobs: with: base-branch: main + version-pr-title: 'chore: release {current_version} → {next_version}' source: tags comment-mode: always prepare-release: true diff --git a/AGENTS.md b/AGENTS.md index b18e4dede..aa542c674 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -176,15 +176,16 @@ Changelog parsing, fragments, history and release policy belong to the external `fast-forward/changelog` package. The workflow caller uses the user-selected `php-fast-forward/changelog/.github/workflows/changelog.yml@v0` channel and uses the official README caller with the owner-approved -`name: Fast Forward Changelog` and `publish: true` overrides: +`name: Fast Forward Changelog`, `publish: true` and +`version-pr-title: 'chore: release {current_version} → {next_version}'` overrides: `base-branch: main`, `source: tags`, `comment-mode: always` and `prepare-release: true`. Merging the reviewed managed version PR automatically publishes its tag and GitHub Release at the approved commit. The workflow never merges the PR itself. This configured publication needs no second per-release permission; manual publication and changes to existing publications still need explicit authorization. -Its defaults select Ubuntu, the GitHub token, `changelog/version` and -`chore: update changelog`. Contributions add independent `.changelog/*.md` +Its defaults select Ubuntu, the GitHub token and `changelog/version`; the PR +title is configured above. Contributions add independent `.changelog/*.md` fragments; do not create a new `Unreleased` section. Automatic PR-origin lookup uses the library's default enabled policy. Test history-writing or fragment-consuming operations only in disposable checkouts. diff --git a/README.md b/README.md index d62ddc4dd..f05a4e6f6 100644 --- a/README.md +++ b/README.md @@ -279,9 +279,10 @@ workflow that reacts when a pull request becomes ready for review and posts a deterministic brief for the dedicated review agent. The external workflow checks fragments and prepares one managed version PR -on `changelog/version`, titled `chore: update changelog`. This repository uses +on `changelog/version`, with the configured title +`chore: release {current_version} → {next_version}`. This repository uses the official README caller with the explicitly approved -`name: Fast Forward Changelog` and `publish: true` settings: `main`, history +`name: Fast Forward Changelog`, `publish: true` and `version-pr-title` settings: `main`, history from tags, feedback on every PR and release preparation enabled. The lifecycle uses its default Ubuntu runner and GitHub token. Merging the reviewed managed version PR automatically publishes its tag and diff --git a/docs/advanced/consumer-automation.rst b/docs/advanced/consumer-automation.rst index 1b385f162..f58a0de26 100644 --- a/docs/advanced/consumer-automation.rst +++ b/docs/advanced/consumer-automation.rst @@ -106,9 +106,11 @@ How Changelog and Project Automation Fit In - ``.github/workflows/changelog.yml`` calls the external Changelog lifecycle at ``@v0`` using the official README's single-job caller with the - owner-approved ``name: Fast Forward Changelog`` and ``publish: true`` overrides. + owner-approved ``name: Fast Forward Changelog``, ``publish: true`` and + ``version-pr-title`` overrides. - The external workflow validates contribution fragments and prepares the - ``changelog/version`` PR titled ``chore: update changelog``. Publication is + ``changelog/version`` PR with the configured title + ``chore: release {current_version} → {next_version}``. Publication is automatic after that reviewed PR is merged. The lifecycle uses its default Ubuntu runner and GitHub token and never merges the PR itself. - ``.github/workflows/review.yml`` composes its ready-for-review intake from diff --git a/docs/commands/changelog.rst b/docs/commands/changelog.rst index 64b4597ba..b5712b012 100644 --- a/docs/commands/changelog.rst +++ b/docs/commands/changelog.rst @@ -88,8 +88,10 @@ The repository caller selects the external workflow's ``@v0`` channel, which tracks published 0.x releases. Local CPX examples select the latest published CLI without a version constraint. Resolve the workflow channel and record the CLI version used when validating release operations; review their compatibility. -The official caller uses ``changelog/version`` and the title -``chore: update changelog``. The Bot owns that branch: let automation +The repository caller uses ``changelog/version`` and configures +``version-pr-title: 'chore: release {current_version} → {next_version}'``. +The placeholders resolve to the current and next versions from the validated +plan. The Bot owns that branch: let automation regenerate its PR and inspect the new exact head rather than editing the branch or forging ownership trailers. diff --git a/docs/internals/release-publishing.rst b/docs/internals/release-publishing.rst index 5a5cfcbb5..5188076bb 100644 --- a/docs/internals/release-publishing.rst +++ b/docs/internals/release-publishing.rst @@ -12,7 +12,7 @@ Version PR and authorization external ``Fast Forward Changelog`` status plus repository quality gates. 2. Accepted contributions merge into ``main``. The external lifecycle prepares or regenerates the single managed ``changelog/version`` PR with title - ``chore: update changelog``. + configured as ``chore: release {current_version} → {next_version}``. 3. Review the exact new head, planned version, notes, comparison links and consumed fragment deletions. The Bot owns the branch; do not edit it manually or fake its transaction evidence. Let automation regenerate after base moves. @@ -25,7 +25,7 @@ Version PR and authorization The caller selects the upstream ``@v0`` channel with the official README configuration plus the owner-approved ``name: Fast Forward Changelog`` and -``publish: true`` overrides: ``main``, +``publish: true`` and ``version-pr-title`` overrides: ``main``, historical source ``tags``, feedback ``always`` and release preparation enabled. The external defaults provide the Ubuntu runner and GitHub token. Local Changelog execution uses the latest published CLI through CPX and PHP 8.5, without changing the consumer PHP 8.3 diff --git a/docs/usage/github-actions.rst b/docs/usage/github-actions.rst index 836fc6820..bd8e41743 100644 --- a/docs/usage/github-actions.rst +++ b/docs/usage/github-actions.rst @@ -288,13 +288,15 @@ runner needs Docker, Bash and Git. It does not install the consumer Composer dependencies or require the consumer to run PHP 8.5. Both callers use the official README YAML with the owner-approved -``name: Fast Forward Changelog`` and ``publish: true`` overrides and one ``changelog`` +``name: Fast Forward Changelog``, ``publish: true`` and ``version-pr-title`` overrides and one ``changelog`` job. They set ``base-branch: main``, ``source: tags``, ``comment-mode: always``, ``prepare-release: true`` and ``publish: true``. The job grants ``contents: write``, ``pull-requests: write``, ``issues: read`` and ``statuses: write``; workflow-level permissions remain empty. The external defaults select Ubuntu, ``GITHUB_TOKEN``, ``CHANGELOG.md``, ``.changelog``, -``changelog/version`` and the PR title ``chore: update changelog``. +and ``changelog/version``. The callers explicitly configure +``version-pr-title: 'chore: release {current_version} → {next_version}'``; +the library substitutes the validated plan's current and next versions. Automatic PR-origin lookup uses the external default enabled policy. It resolves missing origins from committed fragment bytes and merged PR evidence diff --git a/resources/github-actions/changelog.yml b/resources/github-actions/changelog.yml index 991c29b3b..2dfde9a26 100644 --- a/resources/github-actions/changelog.yml +++ b/resources/github-actions/changelog.yml @@ -28,6 +28,7 @@ jobs: with: base-branch: main + version-pr-title: 'chore: release {current_version} → {next_version}' source: tags comment-mode: always prepare-release: true diff --git a/tests/GitHubActions/ChangelogWorkflowTest.php b/tests/GitHubActions/ChangelogWorkflowTest.php index fbd2d6eb8..ad801dcde 100644 --- a/tests/GitHubActions/ChangelogWorkflowTest.php +++ b/tests/GitHubActions/ChangelogWorkflowTest.php @@ -64,6 +64,7 @@ public function workflowWillUseTheOfficialSingleJobCallerWithAutomaticPublishing 'uses' => 'php-fast-forward/changelog/.github/workflows/changelog.yml@v0', 'with' => [ 'base-branch' => 'main', + 'version-pr-title' => 'chore: release {current_version} → {next_version}', 'source' => 'tags', 'comment-mode' => 'always', 'prepare-release' => true,