fix(scripts): retry a 405 merge and show Forgejo's refusal in pr.sh #43

Merged
piscis merged 1 commit from piscis/pr-merge-retry into main 2026-10-10 07:53:09 +00:00
Owner

Follow-up to #41. Seen while landing #42: merging right after another PR landed got an empty 405, and pr.sh merge threw the response away, so the failure only said "refused".

  • A 405 now gets up to 5 more tries, 5s apart, while Forgejo re-checks the PR against its new base.
  • On failure the script prints the HTTP code and Forgejo's message.
  • A PR that is no longer open fails at once (#41 is already merged) instead of going through the retries.
  • docs/agents/forgejo.md records the 405 gotcha.

Tested: merging the already merged #41 fails at once; before the open check, it went through all six 405 attempts and printed the HTTP code. shellcheck is clean.

Follow-up to #41. Seen while landing #42: merging right after another PR landed got an empty 405, and `pr.sh merge` threw the response away, so the failure only said "refused". - A 405 now gets up to 5 more tries, 5s apart, while Forgejo re-checks the PR against its new base. - On failure the script prints the HTTP code and Forgejo's message. - A PR that is no longer open fails at once (`#41 is already merged`) instead of going through the retries. - `docs/agents/forgejo.md` records the 405 gotcha. Tested: merging the already merged #41 fails at once; before the open check, it went through all six 405 attempts and printed the HTTP code. shellcheck is clean.
fix(scripts): retry a 405 merge and show Forgejo's refusal in pr.sh
All checks were successful
ci / build (pull_request) Successful in 32s
f7a5055994
piscis merged commit 28e8e5ca33 into main 2026-10-10 07:53:09 +00:00
piscis deleted branch piscis/pr-merge-retry 2026-10-10 07:53:09 +00:00
Sign in to join this conversation.
No description provided.