Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / go.opencensus.io / CONTRIBUTING.md
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 $ make install-tools  # Only first time.
45 $ make
46 ```
47
48 Checkout a new branch, make modifications and push the branch to your fork:
49
50 ```
51 $ git checkout -b feature
52 # edit files
53 $ git commit
54 $ git push fork feature
55 ```
56
57 Open a pull request against the main opencensus-go repo.
58
59 ## General Notes
60 This project uses Appveyor and Travis for CI.
61
62 The dependencies are managed with `go mod` if you work with the sources under your
63 `$GOPATH` you need to set the environment variable `GO111MODULE=on`.