Skip to content

Auto-merge by default: every same-repo PR that references an issue gets squash auto-merge #9086

Closed

Description

@gHashTag

The owner, 2026-10-11 (translated): "make auto-merge the default!"

On 2026-10-11, none of the 215 open bee and port PRs had auto-merge, so a PR that went green still sat until someone merged it by hand. GitHub has no repository setting that turns auto-merge on for every PR; it has to be enabled per PR. The Issue Gate already runs on every PR event (pull_request_target: opened, edited, reopened, synchronize) and already knows whether the PR references an issue, so the step belongs there.

User Scenarios

  • Given a PR from a branch of gHashTag/t27 whose body says Closes #N, when the Issue Gate passes, then squash auto-merge is enabled on it and it merges as soon as the required checks are green.
  • Given a draft PR, a PR from a fork, or a PR labelled no-auto-merge, when the gate runs, then auto-merge is not enabled.
  • Given a PR with no issue reference, when the gate fails, then the auto-merge step does not run.

Requirements

  • FR-001: The step MUST run only after the issue reference check passed, and only for non-draft PRs whose head repository is gHashTag/t27 and that lack the label no-auto-merge.
  • FR-002: It MUST use GH_AGENT_TOKEN, as queen-publish.yml does, so that the merge commit starts master's workflows. A merge made with GITHUB_TOKEN starts none.
  • FR-003: The PR MUST be net <= 0 in hand-written lines (policy: hand-written code in any language but t27 may only shrink (Closes #8227) #8236).

Success Criteria

  • grep -c 'Auto-merge by default' .github/workflows/issue-gate.yml prints 1.
  • With the criterion above satisfied, the first PR opened after the merge shows autoMergeRequest set, as reported by gh pr view N --json autoMergeRequest.
  • git diff --numstat of the PR shows .github/workflows/issue-gate.yml with deletions >= additions.

Boundary

  • .github/workflows/issue-gate.yml

Activity

  1. added 2 commits that reference this issue on Oct 11, 2026
    8c43c84
    a314273
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions