Skip to content

gh pr create duplicates targets if there are duplicate remotes #8158

@andreasabel

Description

@andreasabel

If there are several remotes pointing to the same target (here: origin and upstream), gh pr create will show duplicate entries in the list of choices (here agda/agda-stdlib). Version is 2.36.0.

$  git remote -v
abel	git@github.com:andreasabel/agda-stdlib.git (fetch)
abel	git@github.com:andreasabel/agda-stdlib.git (push)
...
origin	git@github.com:agda/agda-stdlib.git (fetch)
origin	git@github.com:agda/agda-stdlib.git (push)
...
upstream	git@github.com:agda/agda-stdlib.git (fetch)
upstream	git@github.com:agda/agda-stdlib.git (push)

$ gh pr create --fill
? Where should we push the ... branch?  [Use arrows to move, type to filter]
> agda/agda-stdlib
  agda/agda-stdlib
  andreasabel/agda-stdlib
  Skip pushing the branch
  Cancel

$ gh --version
gh version 2.36.0 (2023-10-03)
https://github.com/cli/cli/releases/tag/v2.36.0

Proposed fix: unify choices that have the same target (or disambiguate in the list if there is speaking anything against unification).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomep3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions