Skip to content

fix(source-control): pull-request merge must confirm the PR entered the merge queue #6630

Closed

Description

@kyle-sexton

Observed 2026-10-07: gh pr merge <n> --squash on a merge-queue branch prints "The merge strategy for main is set by the merge queue". Sometimes the PR still does not enter the queue: #6481 sat CLEAN, with auto-merge armed and isInMergeQueue false, until it was queued directly with the GraphQL enqueuePullRequest mutation. #6426 needed the same check.

GitHub's docs say a PR joins the queue through the merge button or auto-merge (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue). The merge phase (plugins/source-control/skills/pull-request/reference/merge.md) should:

  • after gh pr merge, read isInMergeQueue;
  • when the PR is CLEAN and not queued, run enqueuePullRequest;
  • report the enqueue error verbatim. For example, "A conversation must be resolved" names the blocker.

Acceptance: a merge run either ends with the PR queued or merged, or names the blocker GitHub returned.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 8, 2026
  2. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    Understood: gh pr merge --squash on a merge-queue branch can report success without the PR actually entering the queue (seen on #6481 and #6426), and the merge phase doc (plugins/source-control/skills/pull-request/reference/merge.md) doesn't verify isInMergeQueue or fall back to the enqueuePullRequest GraphQL mutation when it's false. The request is scoped clearly: after merge, check isInMergeQueue, enqueue directly when CLEAN-but-not-queued, and surface GitHub's enqueue error verbatim (e.g. an unresolved-conversation blocker) rather than failing silently. Acceptance criteria are already stated in the issue. No duplicates found in open issues. Nothing appears missing to act on this.

    Automated triage. A maintainer reviews it.

  3. kyle-sexton commented on Oct 11, 2026

    @kyle-sexton
    ContributorAuthor

    Draft PR: #7075 (branch fix/6630-merge-confirm-queue-entry).

    The merge phase gains §4.2.2 "Confirm queue entry": after gh pr merge on a merge-queue base it reads isInMergeQueue, enqueues a CLEAN PR left out once with enqueuePullRequest at the head pinned in 4.1, and reports GitHub's refusal text verbatim, so a run ends merged, queued, or held with a named blocker. 4.2 and 4.2.1 point at it, and an armed auto-merge is reported.

    Verified with bash -n, shellcheck, a stubbed-gh run across 7 states, scripts/affected-tests.sh --base origin/main --run (plus the 2 selected Python suites, 48 passed), markdownlint and the changelog fragment checks.

    Left for a human: no live run against a real merge queue (GraphQL is refused from this session). Marking the PR ready waits for Kyle.


    Generated by Claude Code

  4. kyle-sexton commented on Oct 11, 2026

    @kyle-sexton
    ContributorAuthor

    Handoff note for whoever picks this up next. The overnight Claude run has stopped, and Kyle is moving issue work to Cursor.

    Where a branch is listed it is pushed, so it can be taken over as is. A draft PR shows a red ci-status by design until it is marked ready.


    Generated by Claude Code

  5. removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 12, 2026
  6. added theissue type on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions