Skip to content

default repo tweaks #6827

@vilmibm

Description

@vilmibm

For gh repo clone and gh repo fork, we should set a default base repo now that it's easy for users to change that after the fact.

In both commands, we should pick the parent repository and print a message about it:

# Cloning a fork

$ gh repo clone vilmibm/cli
! cli/cli selected as default repo for querying issues, pull requests, etc. 
! To learn more or change this selection, see: gh repo set-default

# Forking

$ gh repo fork cli/cli
# ... interactive flow

! cli/cli selected as default repo for querying issues, pull requests, etc. 
! To learn more or change this selection, see: gh repo set-default

If a gh repo clone operation results in a single remote, we don't need to print anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-reporelating to the gh repo commandhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions