Add --pr flag to repo clone
command and/or a pr clone
command
#825
Labels
core
This issue is not accepting PRs from outside contributors
enhancement
a request to improve CLI
gh-repo
relating to the gh repo command
Describe the feature or problem you’d like to solve
Essentially I would like to use the tool to pull down the code at the head of a specific PR in CI & other automated scripts w/ containerized machines a la kubernetes pods, etc., using only the PR's number.
This is currently possible by doing
however that can take a long time if the repository has an extensive history or a lot of files.
For these situations I don't need to clone my whole repo and would like to simply clone with
--single-branch
and--depth 1
and a PR's branch name to make it faster.Proposed solution
Given the existing infrastructure in the CLI for parsing PR info, this should be straightfoward, and as simple as translating a
--pr
flag into git-clone's already-supported--branch flag
.The text was updated successfully, but these errors were encountered: