Skip to content

Feature Request: Add built-in auto-merge keybinding support #805

@k-jun

Description

@k-jun

Is your feature request related to a problem? Please describe.
When reviewing multiple PRs in gh-dash, enabling auto-merge requires leaving the dashboard to run gh pr merge --auto. This breaks the workflow and adds friction, especially when batch-processing PRs that are waiting on CI.

Describe the solution you'd like
A built-in keybinding (e.g., Shift+M) that enables auto-merge on the currently selected PR, with a confirmation prompt. Ideally it would support merge strategy selection (squash/merge/rebase) either via config default or an inline picker.

Additionally, the PR detail sidebar (Overview tab) should display whether auto-merge is enabled. Currently, the Checks Overview section in prview/checks.go renders three status categories — Review, Checks, and Merge — but none of them reflect auto-merge state. The proposed UI change:

  • Add an auto-merge status indicator in the Merge Status section of the Checks Overview box. When auto-merge is enabled, show the selected merge strategy (e.g., Auto-merge enabled (squash)) with a distinct icon and color, alongside the existing merge state (CLEAN, BLOCKED, CONFLICTING, etc.).
  • This requires fetching the autoMergeRequest field from the GitHub GraphQL API in data/prapi.go, which provides enabledAt, mergeMethod, and enabledBy.

Describe alternatives you've considered
Custom keybindings with command field work today. A toggle-style command can enable or disable auto-merge depending on the current state:

keybindings:
  prs:
    - key: M
      command: >
        AUTO=$(gh pr view {{.PrNumber}} -R {{.RepoName}} --json autoMergeRequest -q '.autoMergeRequest // empty');
        if [ -n "$AUTO" ]; then
          gh pr merge --disable-auto {{.PrNumber}} -R {{.RepoName}};
        else
          gh pr merge --auto --merge {{.PrNumber}} -R {{.RepoName}};
        fi

This is functional but has limitations:

  • No visual feedback in the dashboard (the PR status doesn't update until refresh)
  • No confirmation prompt, so accidental keypresses can toggle auto-merge
  • Every user must configure it manually
  • The toggle logic is non-trivial for a keybinding — a built-in command would handle this seamlessly

Additional context
Auto-merge is a core GitHub feature that pairs naturally with a PR dashboard workflow. Having it built-in would also allow gh-dash to show auto-merge status as a visual indicator on the PR list.

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