]>
Commit | Line | Data |
---|---|---|
107c1cdb ND |
1 | # How to contribute |
2 | ||
3 | We'd love to accept your patches and contributions to this project. There are | |
4 | just a few small guidelines you need to follow. | |
5 | ||
6 | ## Contributor License Agreement | |
7 | ||
8 | Contributions to this project must be accompanied by a Contributor License | |
9 | Agreement. You (or your employer) retain the copyright to your contribution, | |
10 | this simply gives us permission to use and redistribute your contributions as | |
11 | part of the project. Head over to <https://cla.developers.google.com/> to see | |
12 | your current agreements on file or to sign a new one. | |
13 | ||
14 | You generally only need to submit a CLA once, so if you've already submitted one | |
15 | (even if it was for a different project), you probably don't need to do it | |
16 | again. | |
17 | ||
18 | ## Code reviews | |
19 | ||
20 | All submissions, including submissions by project members, require review. We | |
21 | use GitHub pull requests for this purpose. Consult [GitHub Help] for more | |
22 | information on using pull requests. | |
23 | ||
24 | [GitHub Help]: https://help.github.com/articles/about-pull-requests/ | |
25 | ||
26 | ## Instructions | |
27 | ||
28 | Fork the repo, checkout the upstream repo to your GOPATH by: | |
29 | ||
30 | ``` | |
31 | $ go get -d go.opencensus.io | |
32 | ``` | |
33 | ||
34 | Add your fork as an origin: | |
35 | ||
36 | ``` | |
37 | cd $(go env GOPATH)/src/go.opencensus.io | |
38 | git remote add fork git@github.com:YOUR_GITHUB_USERNAME/opencensus-go.git | |
39 | ``` | |
40 | ||
41 | Run tests: | |
42 | ||
43 | ``` | |
44 | $ go test ./... | |
45 | ``` | |
46 | ||
47 | Checkout a new branch, make modifications and push the branch to your fork: | |
48 | ||
49 | ``` | |
50 | $ git checkout -b feature | |
51 | # edit files | |
52 | $ git commit | |
53 | $ git push fork feature | |
54 | ``` | |
55 | ||
56 | Open a pull request against the main opencensus-go repo. |