Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: better support for cloning forked repos #139

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

hashtagchris
Copy link
Contributor

@hashtagchris hashtagchris commented Jul 23, 2024

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

Change to favor the upstream remote: npm/template-oss#363

npm/json-parse-even-better-errors#65

cli/cli#9261 (comment)

cli/cli#6777

@hashtagchris hashtagchris changed the title fix: used forked repo as default, not upstream feat: better support for cloning forked repos Jul 23, 2024
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`
@hashtagchris hashtagchris force-pushed the hashtagchris-gh-set-default branch from ffec971 to 5ea4245 Compare July 23, 2024 00:41
@hashtagchris hashtagchris marked this pull request as ready for review July 23, 2024 12:29
@hashtagchris hashtagchris requested a review from a team as a code owner July 23, 2024 12:29
@hashtagchris hashtagchris merged commit eb6d5ef into main Jul 23, 2024
20 checks passed
@hashtagchris hashtagchris deleted the hashtagchris-gh-set-default branch July 23, 2024 15:07
@github-actions github-actions bot mentioned this pull request Jul 23, 2024
hashtagchris pushed a commit that referenced this pull request Aug 27, 2024
🤖 I have created a release *beep* *boop*
---


## [3.0.0](v2.5.0...v3.0.0)
(2024-08-27)

### ⚠️ BREAKING CHANGES

* `stafftools` now supports node `>=22.0.0`

### Features

*
[`eb6d5ef`](eb6d5ef)
[#139](#139) better support for
cloning forked repos (#139) (@hashtagchris)

### Bug Fixes

*
[`ebc67cf`](ebc67cf)
[#144](#144) move node engines to
22 (@hashtagchris)

### Dependencies

*
[`08d9927`](08d9927)
[#135](#135) bump minimatch from
9.0.5 to 10.0.1 (@dependabot[bot])

### Chores

*
[`2612ea9`](2612ea9)
[#144](#144) run
template-oss-apply (@hashtagchris)
*
[`d5fcc51`](d5fcc51)
[#143](#143) bump
@npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot])
*
[`21fe981`](21fe981)
[#137](#137) postinstall for
dependabot template-oss PR (@hashtagchris)
*
[`0d227d9`](0d227d9)
[#137](#137) bump
@npmcli/template-oss from 4.22.0 to 4.23.1 (@dependabot[bot])

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants