We'd love to accept your patches and contributions to this project.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.
If you or your current employer have already signed the Google CLA (even if it was for a different project), you probably don't need to do it again.
Visit https://cla.developers.google.com/ to see your current agreements or to sign a new one.
This project follows Google's Open Source Community Guidelines.
We follow the fork and branch workflow.
There will be three Git repositories involved:
- upstream - the ServiceWeaver repository on GitHub.
- origin - your GitHub fork of
upstream
. This repository will typically be at a URL that looks likegithub.com/_your_user_name_/weaver
- local - your local clone of
origin
Follow these steps to get ready for making changes to ServiceWeaver. These steps are only needed once and not for subsequent changes you might want to make:
-
Fork the
ServiceWeaver
repository on GitHub to createorigin
. Visit ServiceWeaver GitHub repository and click theFork
button. -
Make a
local
clone of your fork.git clone [email protected]:_your_user_name_/weaver.git
-
Add a remote pointing from
local
toupstream
.cd weaver git remote add upstream [email protected]:ServiceWeaver/weaver.git
Here is a detailed outline of the steps needed to make changes to Service Weaver.
-
Make a local branch in your clone and pull any recent changes into it.
git switch -c my_branch # Pick a name appropriate to your work git pull upstream main
-
Make changes and commit to local branch.
# ... editing, testing, ... git commit ...
-
Pull any changes that may have been made in the upstream repository main branch.
git switch my_branch git pull --rebase upstream main
Note that this command may result in merge conflicts. Fix those if needed.
-
Push your branch to the corresponding branch in your fork (the
origin
repository).git switch my_branch git push origin my_branch
-
Select the branch you are working on in the drop-down menu of branches on https://github.com/_your_user_name_/weaver . Then hit the
Compare and pull request
button. -
Respond to feedback, which may involve making new commits. If you made any changes, push them to github again.
git switch my_branch git push origin my_branch
Repeat as necessary until all feedback has been handled.
Note: the preceding approach will cause the pull request to become a sequence of commits. Some people like to keep just a single commit that is amended as changes are made. If you are amending commits that had already been pushed, you will have to add
--force
to thegit push
command above. -
Once reviewers are happy, pull any main branch changes that may have happened since step 3.
git switch my_branch git pull --rebase upstream main
If some changes were pulled, push again to the PR, but this time you will need to force push since the rebase above will have rewritten your commits.
git switch my_branch git push --force origin my_branch
-
Ask somebody who has permissions (or do it yourself if you have permissions) to merge your branch into the main branch of the
upstream
repository. The reviewer may do this without being asked.Select the
Squash and merge
option on https://github.com/ServiceWeaver/weaver or use the command line instructions found on that page. Edit the commit message as appropriate for the squashed commit. -
Delete the branch from
origin
:git push origin --delete my_branch
-
Delete the branch from
local
git switch main git branch -D my_branch
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
To make sure changes are well coordinated, we ask you to discuss any significant change prior to sending a pull request. To do so, either file a new issue or claim an existing one.
Here are the current areas where the community contributions would be most valuable:
- Implement deployers for platforms other than local, SSH, and GKE.
- Bug fixes for the existing libraries.
- Non-Go language support. (Note: please reach out to us on our [google_group][Google Group], to coordinate development. We will likely require a fair bit of API and language-integration design discussion before the implementation starts.)