Skip to content

Fix freeze patch branching logic #1590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged

Fix freeze patch branching logic #1590

merged 1 commit into from
Jun 17, 2025

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Jun 17, 2025

The code that applies freeze patches assumed that the caller would always want to return to main afterwards. That assumption is only valid when curation runs against main, not when it runs as part of a pull request, or locally when preparing a pull request on a different branch.

The new logic gets back to the right position, either a branch name if there's one, or a commit ID if contex is in "detached HEAD" mode.

The code that applies freeze patches assumed that the caller would always want
to return to `main` afterwards. That assumption is only valid when curation
runs against `main`, not when it runs as part of a pull request, or locally
when preparing a pull request on a different branch.

The new logic gets back to the right position, either a branch name if there's
one, or a commit ID if contex is in "detached HEAD" mode.
@tidoust
Copy link
Member Author

tidoust commented Jun 17, 2025

Tests fail for an unrelated data curation reason.

@tidoust tidoust requested a review from dontcallmedom June 17, 2025 11:02
@tidoust tidoust merged commit 2ff37dd into main Jun 17, 2025
1 check failed
@tidoust tidoust deleted the fix-freeze-logic branch June 17, 2025 11:43
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