Skip to content

fix: restore release PR body on rollback after finalize failure#503

Merged
c-vigo merged 2 commits intorelease/0.3.2from
bugfix/502-rollback-restore-pr-body
Apr 7, 2026
Merged

fix: restore release PR body on rollback after finalize failure#503
c-vigo merged 2 commits intorelease/0.3.2from
bugfix/502-rollback-restore-pr-body

Conversation

@c-vigo
Copy link
Copy Markdown
Contributor

@c-vigo c-vigo commented Apr 7, 2026

Description

When finalize fails and the release workflow rolls back the release branch, the release PR description could be left out of sync. This change extends the rollback job in release.yml so that, for final releases, it restores the PR body from the pre-finalization CHANGELOG.md (TBD / prepare-release format) using RELEASE_APP, and surfaces the outcome in the failure issue and job summary.

Type of Change

  • feat -- New feature
  • fix -- Bug fix
  • docs -- Documentation only
  • chore -- Maintenance task (deps, config, etc.)
  • refactor -- Code restructuring (no behavior change)
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes
  • build -- Build system or dependency changes
  • revert -- Reverts a previous commit
  • style -- Code style (formatting, whitespace)

Modifiers

  • Breaking change (!) -- This change breaks backward compatibility

Changes Made

  • .github/workflows/release.yml
    • Add rollback step(s) to restore release PR body after branch rollback when release_kind is final, using changelog-derived description and RELEASE_APP.
  • CHANGELOG.md / assets/workspace/.devcontainer/CHANGELOG.md
    • Document the fix under ## [0.3.2] - TBD → Fixed.

Changelog Entry

@@ -91,6 +91,8 @@
   - Release rollback creates a fast-forward revert commit via the Git API instead of force-pushing, compatible with branch protection on `release/*`
   - Rollback Git Data API steps authenticate with the Commit app token (same as finalize) so protected `release/*` ref updates are not blocked
   - Canonical `retry()` implementation lives in `.github/scripts/retry.sh`; `setup-env` and BATS source it so CI and tests stay aligned (`sync-main-to-dev.yml` keeps an inline copy documented as in sync)
+- **Release rollback restores release PR body after finalize** ([#502](https://github.com/vig-os/devcontainer/issues/502))
+  - `rollback` job in `release.yml` restores the PR description from pre-finalization `CHANGELOG.md` (TBD / prepare-release format) using RELEASE_APP when `release_kind` is final, after branch rollback; failure issue and job summary report the step outcome
 
 ### Security

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

N/A (CI workflow change; tests not run for this submission.)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (edit docs/templates/, then run just docs)
  • I have updated CHANGELOG.md under ## [0.3.2] - TBD (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

N/A

Refs: #502

@c-vigo c-vigo self-assigned this Apr 7, 2026
@c-vigo c-vigo requested a review from Copilot April 7, 2026 22:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the release workflow’s failure rollback behavior so that when a final release fails after PR-body finalization, the rollback job also restores the release PR description back to the pre-finalization (TBD / prepare-release) format, keeping the PR consistent with the rolled-back branch state.

Changes:

  • Add a rollback step in release.yml to reconstruct and restore the release PR body from CHANGELOG.md at the recorded pre-finalization SHA (final releases only).
  • Surface PR body restoration outcome in the rollback failure issue and job summary output.
  • Document the fix in the root and workspace-template changelogs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release.yml Adds best-effort PR body restoration during rollback for final releases, and reports outcome in issue/summary.
CHANGELOG.md Records the rollback PR-body restoration fix under the upcoming release notes.
assets/workspace/.devcontainer/CHANGELOG.md Mirrors the changelog entry in the workspace template.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@c-vigo c-vigo enabled auto-merge April 7, 2026 22:18
@c-vigo c-vigo merged commit 60e1098 into release/0.3.2 Apr 7, 2026
11 checks passed
@c-vigo c-vigo deleted the bugfix/502-rollback-restore-pr-body branch April 7, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants