-
Notifications
You must be signed in to change notification settings - Fork 62
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-chunker
at the end. Make surego test ./...
passes. - Modify go.mod in
go-btfs
, add a linereplace github.com/TRON-US/go-unixfs => ../go-unixfs
at 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_test
andmake install
to make surego-btfs
works 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-btfs
team 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 toBTFS
branch. SetBTFS
as default branch in settings.
- If forked code needs to be based on a specific release (other than
-
- Set up branch protection rules on
master
(andBTFS
if 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 surereplace
lines 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-chunker
with 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 havegit.luolix.top/TRON-US/go-btfs-chunker v1.2.3
. - After approval and merge, draft a new release on
go-unixfs
with 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-btfs
PR and fill out the description based on template: https://github.com/TRON-US/go-btfs/blob/master/.github/PULL_REQUEST_TEMPLATE.md