Skip to content

fix: restore original checkout after localization branch sync#311

Merged
andrii-bodnar merged 1 commit intomasterfrom
fix/restore-checkout-after-l10n-push
Apr 22, 2026
Merged

fix: restore original checkout after localization branch sync#311
andrii-bodnar merged 1 commit intomasterfrom
fix/restore-checkout-after-l10n-push

Conversation

@andrii-bodnar
Copy link
Copy Markdown
Member

Fixes: #310

@sakurawald
Copy link
Copy Markdown

Tested in my CI flow, LGTM.

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

Fixes the GitHub Action side-effect where, after syncing/pushing the localization branch, the repository remains checked out at an unexpected commit—causing subsequent workflow steps to run against the wrong revision.

Changes:

  • Capture the original Git checkout state (branch name when available, otherwise the current commit SHA) before switching refs/branches.
  • Restore the original checkout state after localization branch operations complete (including the “nothing to commit” path).
  • Refactor push/PR creation flow to preserve and return a consolidated exit code while ensuring restore is attempted.

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

@andrii-bodnar andrii-bodnar merged commit c4603c0 into master Apr 22, 2026
6 checks passed
@andrii-bodnar andrii-bodnar deleted the fix/restore-checkout-after-l10n-push branch April 22, 2026 07:38
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.

v2.11.0 introduces the side-effect to cause the succeeding github steps to run on the improper commit.

3 participants