mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 15:31:53 +00:00
a22f8f0a09
fix(github): attempt direct merge before falling back to the merge queue PR automerge against a merge-queue-protected base branch could no longer merge directly when the authenticated actor is allowed to bypass the queue: mergePr() enqueues the PR unconditionally once the base branch has a merge queue, and the enqueuePullRequest mutation evaluates queue-entry requirements (e.g. required code-owner review) without honoring ruleset bypass, leaving bypass-enabled installs unable to merge at all. Attempt the direct REST merge first and enqueue only when that merge is refused, mirroring the try-first design #45724 shipped for branch automerge. Repositories without a bypass actor pay one refused REST merge call per automerge attempt before the queue fallback, and up to four when an unrecognized refusal message triggers method guessing. Docs: describe the direct-merge-first behavior in the GitHub merge queue section of the automerge documentation.