forked from mirror/forgejo
feat(automerge): merge scheduled PRs via cron with CI grace period #2
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/pr-auto-merge-scheduled"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
check_scheduled_auto_mergescron task (every 1m by default) that re-queues open scheduled auto-merge PRs, so merges can proceed after the CI grace period without a new status eventactions.AreRunsReadyToMerge: all existing Actions runs for the head SHA must have succeeded/skipped and stopped at least 30 seconds ago; missing runs do not block, and branch protection still appliesdoMergeRebaseFastForwardinstead of always amending from the templateTesting
TestAreRunsReadyToMergeunit tests covering status/skip/grace-period boundaries, cross-commit/repo isolation, and retry successTestPeriodicAutoMergeActions(merge/squash/rebase styles with message, branch deletion, grace period and failure handling),TestPeriodicAutoMergeWithoutRuns(no runs, closed issue, archived repo), andTestPeriodicAutoMergeFromForkTestActionsAutomergeto sync the fixture PR ref and event payload with the head branchmake test-sqlite, MySQL/PostgreSQL integration suites, and browser E2E