Repository navigation
Lease the template-update push against the fetched branch - #12
Merged
Merged
Conversation
A bare --force-with-lease to a URL has no remote-tracking ref to compare against, so the push is refused with "stale info" whenever the update branch already exists. Lease against the ref checkout fetched instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
template-update.ymlfails every week once its update branch exists. It pushes with a bare--force-with-leaseto a URL rather than toorigin, so git has no remote-tracking ref to lease against and refuses the push withstale info.This is live in the Cloudflare Worker template, which has the same step. Its two consumers, llm-prices and logfile-upload, each had one run that pushed
chore/template-updatebut couldn't open the PR (the Actions pull-request setting was off). Every run since has failed at the push. For example, llm-prices run 37323803351:The fix leases against
refs/remotes/origin/$BRANCH, which checkout's full fetch already populates. An empty value means the branch must not exist yet.Testing
I reproduced it against a local bare remote, with the remote-tracking refs fetched the way checkout fetches them:
stale info. The new one force-pushes.actionlint and
zizmor --offline --persona=auditorare clean on the file.The matching Cloudflare template fix is a separate PR there.
🤖 Generated with Claude Code