-
Notifications
You must be signed in to change notification settings - Fork 57
How to submit PRs involving module updates
Eric Chen edited this page Nov 20, 2019
·
5 revisions
For example, a PR needs to make changes in 3 repos where go-btfs depends on go-unixfs depends on go-btfs-chunker.
Before making any PRs, make sure local testing works:
- Make changes in
go-btfs-chunker. Make surego test ./...passes. - Modify go.mod in
go-unixfs, add a linereplace github.com/TRON-US/go-btfs-chunker => ../go-btfs-chunkerat the end. Make surego test ./...passes. - Modify go.mod in
go-btfs, add a linereplace github.com/TRON-US/go-unixfs => ../go-unixfsat the end. Under the case that some changes are backwards incompatible, there may also need an additionalreplace github.com/TRON-US/go-btfs-chunker => ../go-btfs-chunker. -
make test_go_testandmake installto make surego-btfsworks as intended.
Then follow these PR guidelines:
- Make a PR in the bottom most module, which is
go-btfs-chunker.- If the changing module has not been forked by TRON-US:
-
- Fork and add
go-btfsteam with write access.
- Fork and add
-
- If forked code needs to be based on a specific release (other than
master), branch off the desired tag and push toBTFSbranch. SetBTFSas default branch in settings.
- If forked code needs to be based on a specific release (other than
-
- Set up branch protection rules on
master(andBTFSif needed).
- Set up branch protection rules on
-
- If the forked repo name contains
ipfs, e.g.,xxx-ipfs-yyy, rename toxxx-btfs-yyy.
- If the forked repo name contains
-
- If the forked / existing repo is not public, ask TRON-US owner to change the visibility to public.
-
- After forking, submit PR to update LICENSE, README, go.mod top-level path, and imports (
github.com/ipfs/xxx->github.com/TRON-US/xxx).
- After forking, submit PR to update LICENSE, README, go.mod top-level path, and imports (
-
- After merging, draft a new release with at least a minor version bump.
-
- Make a PR with changes to
go-btfs-chunker. Make surereplacelines are removed from go.mod and rungo mod tidy.
- If the changing module has not been forked by TRON-US:
- After approval and merge, draft a new release on
go-btfs-chunkerwith at least a patch version bump (consult other team members about a minor or major version bump). For example, v1.2.3. - Make a PR in the next level-up module, which is
go-unixfs. Follow the same instructions as Step 1. Then modify go.mod to havegithub.com/TRON-US/go-btfs-chunker v1.2.3. - After approval and merge, draft a new release on
go-unixfswith at least a patch version bump (consult other team members about a minor or major version bump). For example, v4.5.6. - Perform Steps 3-4 for all the modules up until
go-btfs. - Submit final
go-btfsPR and fill out the description based on template: https://github.com/TRON-US/go-btfs/blob/master/.github/PULL_REQUEST_TEMPLATE.md