Fix Forgejo PR merge postconditions #1279

Merged
coilyco-ops merged 1 commit from issue-1170 into main 2026-07-14 11:37:04 +00:00
Member

This tightens the native Forgejo PR merge path so ward does not report success until Forgejo proves merged: true. When Forgejo closes a PR without merging it after a 405 retry, the direct merge verb now fails with the PR number and head SHA, and the director lane will reopen and retry once when the PR is still eligible.

  • What changed: added an explicit merged-state postcondition, a closed-unmerged recovery path for director merge, and coverage for both.
  • Why: the old flow could stop at a 2xx response and miss a closed-but-unmerged PR.
  • Tests: ward exec test and pre-commit run --all-files.

closes #1170
ward.workflow: pull-request-and-merge

This tightens the native Forgejo PR merge path so ward does not report success until Forgejo proves `merged: true`. When Forgejo closes a PR without merging it after a 405 retry, the direct merge verb now fails with the PR number and head SHA, and the director lane will reopen and retry once when the PR is still eligible. - What changed: added an explicit merged-state postcondition, a closed-unmerged recovery path for director merge, and coverage for both. - Why: the old flow could stop at a 2xx response and miss a closed-but-unmerged PR. - Tests: `ward exec test` and `pre-commit run --all-files`. closes #1170 ward.workflow: pull-request-and-merge
Fix Forgejo PR merge postconditions
All checks were successful
test / test (pull_request) Successful in 50s
9b53386b97
Sign in to join this conversation.
No description provided.