Skip to content

fix: skip nightly-testing merge when branch does not exist#13308

Merged
kim-em merged 2 commits intomasterfrom
fix-release-steps-nightly-testing
Apr 8, 2026
Merged

fix: skip nightly-testing merge when branch does not exist#13308
kim-em merged 2 commits intomasterfrom
fix-release-steps-nightly-testing

Conversation

@kim-em
Copy link
Copy Markdown
Collaborator

@kim-em kim-em commented Apr 8, 2026

This PR makes release_steps.py robust to release repos that have no
nightly-testing branch. Previously, git merge origin/nightly-testing
would fail with "not something we can merge" and the error handler
misinterpreted this as a merge conflict, then crashed trying to commit
with nothing to commit. Now we check for the branch with
git ls-remote --heads before attempting the merge.

🤖 Prepared with Claude Code

When a release repo has no nightly-testing branch, `git merge
origin/nightly-testing` fails with "not something we can merge" and the
error handler misinterprets this as a merge conflict, then crashes trying
to commit with nothing to commit. Check for the branch with
`git ls-remote` before attempting the merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kim-em kim-em added the changelog-no Do not include this PR in the release changelog label Apr 8, 2026
@kim-em kim-em force-pushed the fix-release-steps-nightly-testing branch from d9c8758 to f8f6e27 Compare April 8, 2026 00:08
This PR switches from `git ls-remote --heads origin nightly-testing` (which
does substring pattern matching and could match e.g.
`refs/heads/foo/nightly-testing`) to `git show-ref --verify --quiet` on the
local tracking ref after fetch, which is an exact match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kim-em kim-em enabled auto-merge April 8, 2026 00:10
@kim-em kim-em added this pull request to the merge queue Apr 8, 2026
Merged via the queue into master with commit 7e04970 Apr 8, 2026
17 checks passed
wkrozowski pushed a commit to wkrozowski/lean4 that referenced this pull request Apr 10, 2026
…r#13308)

This PR makes `release_steps.py` robust to release repos that have no
`nightly-testing` branch. Previously, `git merge origin/nightly-testing`
would fail with "not something we can merge" and the error handler
misinterpreted this as a merge conflict, then crashed trying to commit
with nothing to commit. Now we check for the branch with
`git ls-remote --heads` before attempting the merge.

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
volodeyka pushed a commit that referenced this pull request Apr 16, 2026
This PR makes `release_steps.py` robust to release repos that have no
`nightly-testing` branch. Previously, `git merge origin/nightly-testing`
would fail with "not something we can merge" and the error handler
misinterpreted this as a merge conflict, then crashed trying to commit
with nothing to commit. Now we check for the branch with
`git ls-remote --heads` before attempting the merge.

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-no Do not include this PR in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant