Repository navigation
Description
Description
When the release.yml workflow fails after the finalize job has already run the "Refresh release PR body from finalized changelog" step, the rollback job resets the release branch to its pre-finalization state but does not revert the PR body. This leaves the release PR in an inconsistent state: the branch's CHANGELOG.md contains ## [X.Y.Z] - TBD while the PR body shows the finalized heading with a date and release link.
Observed on PR #486 (release/0.3.2):
- Branch
CHANGELOG.md:## [0.3.2] - TBD(correctly rolled back) - PR body:
# [Release 0.3.2](https://github.com/vig-os/devcontainer/releases/tag/0.3.2) - 2026-04-07(not rolled back)
Steps to Reproduce
- Trigger
just finalize-release X.Y.Zon a release branch with a draft PR - The
finalizejob succeeds far enough that the "Refresh release PR body from finalized changelog" step runs (gh pr edit --body-file) - A later job (
build-and-testorpublish) fails, triggering therollbackjob - Rollback resets the branch to pre-finalization SHA but does not touch the PR body
Expected Behavior
After rollback, the release PR body should be restored to its pre-finalize state — matching the TBD heading in the branch's CHANGELOG.md — so the PR accurately reflects the branch content.
Actual Behavior
The PR body retains the finalized content (dated heading, release link) while the branch has been rolled back to TBD. This is misleading for anyone reviewing the PR or performing manual follow-up after the failure.
Environment
- OS: GitHub Actions (ubuntu-22.04)
- Workflow:
.github/workflows/release.yml—rollbackjob (line ~1357) - PR: chore: release 0.3.2 #486 (release/0.3.2)
- Failed runs: 24088109667, 24088003035
Additional Context
The rollback job (lines 1357-1493 of release.yml) currently performs two actions:
- Reset the release branch to the pre-finalization SHA via Git Data API revert commit
- Create a failure issue
It does not call gh pr edit to restore the PR body.
The "Refresh release PR body from finalized changelog" step (line 595 of release.yml) runs inside the finalize job. If finalize completes this step successfully but a subsequent job fails, the PR body has already been mutated.
Immediate manual remediation required: PR #486 body must be manually updated to reflect the rolled-back TBD state (replace the finalized heading with the TBD changelog content from the branch).
Possible Solution
Add a step to the rollback job (after branch rollback, before issue creation) that restores the PR body from the rolled-back branch's CHANGELOG.md:
- Fetch
CHANGELOG.mdcontent from the pre-finalization SHA (or the newly rolled-back branch tip) - Extract the release section (which will contain
## [X.Y.Z] - TBD) - Reconstruct the PR body in the original prepare-release format
- Run
gh pr edit "$PR_NUMBER" --body-file <restored-body>
The downstream workspace release.yml (assets/workspace/.github/workflows/release.yml) should be checked for the same gap.
Changelog Category
Fixed
- TDD compliance (see
.cursor/rules/tdd.mdc) - Manually fix PR chore: release 0.3.2 #486 body to restore TBD state
Activity
fix(ci): restore release PR body on rollback after finalize failure
fix(ci): guard release-app-token step with final-release condition
fix: restore release PR body on rollback after finalize failure (#503)
chore: release 0.3.2 (#486)