fix: remove --force-with-lease from main push to unblock 16 PRs
Some checks are pending
CI / lint-and-test (push) Waiting to run

Forgejo categorically blocks --force-with-lease on protected branches,
even for fast-forward pushes. The cherry-picked branch is already a
descendant of origin/main, so a regular push is a fast-forward by
definition. Non-ff is rejected by default — same safety guarantee.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
m3taversal 2026-04-15 16:52:39 +01:00
parent 25062cf130
commit ff357c4bbc

View file

@ -1456,9 +1456,9 @@ async def _merge_domain_queue(conn, domain: str) -> tuple[int, int]:
failed += 1 failed += 1
continue continue
# Local ff-merge: push cherry-picked branch as main (Rhea's approach, Leo+Rhea: local primary) # Local ff-push: cherry-picked branch is a descendant of origin/main.
# The branch was just cherry-picked onto origin/main, # Regular push = fast-forward. Non-ff rejected by default (same safety).
# so origin/{branch} is a descendant of origin/main. Push it as main. # --force-with-lease removed: Forgejo categorically blocks it on protected branches.
await _git("fetch", "origin", branch, timeout=15) await _git("fetch", "origin", branch, timeout=15)
rc, main_sha = await _git("rev-parse", "origin/main") rc, main_sha = await _git("rev-parse", "origin/main")
main_sha = main_sha.strip() if rc == 0 else "" main_sha = main_sha.strip() if rc == 0 else ""
@ -1469,8 +1469,7 @@ async def _merge_domain_queue(conn, domain: str) -> tuple[int, int]:
merge_msg = "" merge_msg = ""
if branch_sha: if branch_sha:
rc, out = await _git( rc, out = await _git(
"push", f"--force-with-lease=main:{main_sha}", "push", "origin", f"{branch_sha}:main",
"origin", f"{branch_sha}:main",
timeout=30, timeout=30,
) )
if rc == 0: if rc == 0: