Skip to content

Add release management and rollback PR creation to rollback workflow#91

Merged
IvanildoBarauna merged 1 commit intomainfrom
claude/fix-rollback-workflow-dDdPE
Mar 4, 2026
Merged

Add release management and rollback PR creation to rollback workflow#91
IvanildoBarauna merged 1 commit intomainfrom
claude/fix-rollback-workflow-dDdPE

Conversation

@IvanildoBarauna
Copy link
Member

Summary

Enhanced the rollback workflow to automatically manage GitHub releases and create pull requests when rolling back to a previous version. This ensures both the deployment environment and source code repository are synchronized during rollback operations.

Key Changes

  • Updated workflow permissions: Added contents: write and pull-requests: write permissions to enable release and PR management operations
  • Release management: Added step to mark the rollback version as the latest release while updating the current latest release status
  • Automated PR creation: Implemented logic to:
    • Create or update a rollback branch based on the rollback tag
    • Automatically create a pull request to merge the rollback version into main
    • Handle existing branches and PRs gracefully to avoid duplicates
    • Include detailed PR description with context and merge instructions

Implementation Details

  • The release marking step uses GitHub CLI to identify the current latest release and update it, then marks the rollback version as latest
  • The PR creation logic checks for existing branches and PRs before creating new ones, with force-push capability for branch updates
  • The generated PR includes comprehensive documentation explaining the rollback reason and merge instructions
  • All operations use ${{ secrets.GITHUB_TOKEN }} for authentication

https://claude.ai/code/session_012gvRFQsELYByYrpbBtiZaV

- Mark rolled back release as latest in GitHub
- Automatically create/update PR to revert code to previous stable version
- Ensures environment and source code stay in sync after rollbacks
- Add necessary permissions for release management and PR creation
@IvanildoBarauna IvanildoBarauna merged commit c8891c2 into main Mar 4, 2026
5 checks passed
@IvanildoBarauna IvanildoBarauna deleted the claude/fix-rollback-workflow-dDdPE branch March 4, 2026 17:03
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