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.

Activity

  1. cli-triage commented on Jul 14, 2026

    @cli-triage

    This is a duplicate of #8514, which tracked the same behavior: gh pr merge --auto merges the PR immediately when there are no pending required checks, rather than enabling auto-merge mode. That issue was recently closed (2026-07-09); please follow it for context and any future resolution.

    Generated by Issue Triage (skills-driven) for #13880 · 19.7 AIC · ⌖ 3.94 AIC · ⊞ 5.1K · ◷

  2. gibfahn commented on Jul 14, 2026

    @gibfahn
    Author

    Responding to #8514 (comment):

    Going to close this out due to staleness and housekeeping. The challenge with this situation is that it's likely largely due to how the API behaves with regard to auto merging. Auto merging isn't much of a client side feature here - we just indicate in the API call to auto merge.

    If there's a specific recent reproducible case that people keep running into, let's start a fresh issue and be sure to include the GH_DEBUG=api output for us to investigate 🙏

    Basically the behaviour I would like is:

    UI shows Expected behaviour Screenshot
    Auto merge Enable auto-merge auto merge
    Mergeable Do nothing merge allowed
    Merge blocked Do nothing no auto merge, merge blocked
  3. gibfahn commented on Jul 14, 2026

    @gibfahn
    Author

    This seems to do the thing I want to do: gibfahn/dot@8ac176f

  4. added
    enhancementa request to improve CLI
    gh-prrelating to the gh pr command
    and removed on Jul 15, 2026
  5. github-actions commented on Jul 15, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.

    Unless you see the help wanted Contributions welcome label, we are not currently looking for external contributions for this feature.

    If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.

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

    enhancementa request to improve CLIgh-prrelating to the gh pr commandstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions