Skip to content

gh pr merge --auto merges the PR if auto-merge isn't enabled/required #13880

Description

@gibfahn

Describe the bug

I want to always enable auto-merge after filing a PR if it is supported by the repo.

However I never want to merge a PR without review, even if the repo hooks allow it.

Today if a PR has no pending required checks, the gh CLI merges it immediately, instead of enabling auto-merge.

Affected version

gh version
gh version 2.96.0 (2026-07-02)
https://github.com/cli/cli/releases/tag/v2.96.0

Steps to reproduce the behavior

  1. Run gh pr merge --auto
  2. See that the PR is directly merged

Expected vs actual behavior

I wanted auto-merge to be enabled, or for the command to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions