feat: allow git remote names in gh repo set-default by majiayu000 · Pull Request #12377 · cli/cli

@majiayu000

When specifying a repository for `gh repo set-default`, users can now
use a git remote name (e.g., "origin", "upstream") instead of the
full OWNER/REPO format.

The command first checks if the argument is a git remote name. If
found, it uses the corresponding repository. Otherwise, it falls
back to parsing the argument as OWNER/REPO format.

Example:
  gh repo set-default origin

Fixes cli#9149

Signed-off-by: majiayu000 <1835304752@qq.com>

babakks

@majiayu000

@majiayu000

babakks

@majiayu000

majiayu000

@majiayu000 majiayu000 deleted the fix-9149-set-default-remote-name branch

January 15, 2026 02:31

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request

Jan 17, 2026

RodnyPHP