-
-
Notifications
You must be signed in to change notification settings - Fork 361
Description
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
autoMergeRequestfield from the GitHub GraphQL API indata/prapi.go, which providesenabledAt,mergeMethod, andenabledBy.
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}};
fiThis 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.