Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better support for cloning forked repos (#139)
<!-- What / Why --> <!-- Describe the request in detail. What it does and why it's being changed. --> By default the gh cli operates against the upstream repo when you run commands like `gh pr checkout ...`. For the purposes of stafftools, we want to operate against the forked repo, so we run `gh repo set-default npm/{name}`. Tested with `node ./bin/gh.mjs template-oss-fix --install --filter 'name:json-parse-even-better-errors'` after removing `~/projects/npm/json-parse-even-better-errors`. Also tested with `node ./bin/gh.mjs repos clone --filter "name:agent"`, to ensure clone still works for non-forked repos. ## References <!-- Examples: Related to #0 Depends on #0 Blocked by #0 Fixes #0 Closes #0 --> Change to favor the upstream remote: npm/template-oss#363 npm/json-parse-even-better-errors#65 cli/cli#9261 (comment) cli/cli#6777
- Loading branch information