Repository navigation
add Forgejo-native approval admission gate and fix Schedule… - #60
Merged
Merged
Conversation
…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.
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.
…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.