Skip to content

add Forgejo-native approval admission gate and fix Schedule… - #60

Merged
rbtr merged 4 commits into
mainfrom
approval-gate
Aug 2, 2026
Merged

rbtr merged 4 commits into
mainfrom
approval-gate

Conversation

@rbtr

@rbtr rbtr commented Aug 2, 2026

Copy link
Copy Markdown
Owner

…Automerge signature

  • ScheduleAutomerge now returns (ScheduleAutomergeResult, error) instead of error. The result's Eligible flag tells callers whether Forgejo accepted or rejected the scheduling request (e.g. missing approvals → rejected).

  • queueEligibility checks AutomergeState first: if the PR is already scheduled the gate passes without re-calling Forgejo. If not scheduled, Forgejo is asked to admit the PR.

  • scheduleAutomerge helper updated to handle the new return type.

  • All callers updated including the mock, burn-in test, and client tests.

rbtr added 4 commits August 2, 2026 13:52
…Automerge signature

- ScheduleAutomerge now returns (ScheduleAutomergeResult, error) instead of
  error.  The result's Eligible flag tells callers whether Forgejo accepted
  or rejected the scheduling request (e.g. missing approvals → rejected).

- queueEligibility checks AutomergeState first: if the PR is already
  scheduled the gate passes without re-calling Forgejo.  If not scheduled,
  Forgejo is asked to admit the PR.

- scheduleAutomerge helper updated to handle the new return type.

- All callers updated including the mock, burn-in test, and client tests.
The request() helper returns nil data on error — extract the body from
httpStatusError instead of relying on the unused data return value.
- TestCheckpointRestoresPendingBisectionFrontier: restructure admission gate
  in readyNumbers to skip bounced PRs (not scheduled) before calling
  ScheduleAutomerge, preventing infinite bounce loops. Simplify
  queueEligibility to only check AutomergeState.

- TestQueueStatusCommentsMarkCancelledAutomergeRequeued: use
  scheduleRejected=true mock flag to simulate Forgejo rejection.

- TestNativeLandingReleasesOnePRAtATime, TestNativeMergeTimeoutBlocksRestoresAndRequeues:
  update call expectations to include new admission gate ScheduleAutomerge calls.
@rbtr
rbtr merged commit 7d84bbe into main Aug 2, 2026
4 checks passed
@rbtr
rbtr deleted the approval-gate branch August 2, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant