Skip to content

fix: Create rollback PR from main with revert commit instead of from tag#101

Merged
IvanildoBarauna merged 1 commit intomainfrom
fix/rollback-pr-revert-strategy
Mar 5, 2026
Merged

fix: Create rollback PR from main with revert commit instead of from tag#101
IvanildoBarauna merged 1 commit intomainfrom
fix/rollback-pr-revert-strategy

Conversation

@IvanildoBarauna
Copy link
Member

Summary

  • Fix rollback workflow that failed with "No commits between main and rollback/x.y.z"
  • Branch was created from old tag (ancestor of main), resulting in empty PR
  • Now creates branch from main HEAD and overwrites files with tag content, producing a real revert commit
  • Remove unnecessary gh release edit --draft=false call

Test plan

  • Trigger rollback workflow manually via workflow_dispatch
  • Verify rollback branch is created from main with revert commit
  • Verify PR is created successfully with visible diffs

🤖 Generated with Claude Code

The rollback branch was being created directly from the old tag, which
is a strict ancestor of main. GitHub cannot create a PR from an ancestor
branch because there are no new commits — causing the error:
"No commits between main and rollback/x.y.z"

Now the branch is created from main HEAD and the files are overwritten
with the tag content, producing an actual revert commit that is ahead
of main with visible diffs.

Also removes unnecessary gh release edit --draft=false call since
marking another release as --latest already removes it from the previous.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@IvanildoBarauna IvanildoBarauna merged commit 3b9b009 into main Mar 5, 2026
5 checks passed
@IvanildoBarauna IvanildoBarauna deleted the fix/rollback-pr-revert-strategy branch March 5, 2026 00:50
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.

1 participant