1 | # Contributing
|
2 |
|
3 | All contributions are welcome to this project.
|
4 |
|
5 | ## Contributor License Agreement
|
6 |
|
7 | Before a contribution can be merged into this project, please fill out the Contributor License Agreement (CLA) located at:
|
8 |
|
9 | http://opensource.box.com/cla
|
10 |
|
11 | To learn more about CLAs and why they are important to open source projects, please see the [Wikipedia entry](http://en.wikipedia.org/wiki/Contributor_License_Agreement).
|
12 |
|
13 | ## How to contribute
|
14 |
|
15 | * **File an issue** - if you found a bug, want to request an enhancement, or want to implement something (bug fix or feature).
|
16 | * **Send a pull request** - if you want to contribute code. Please be sure to file an issue first.
|
17 |
|
18 | ## Pull request best practices
|
19 |
|
20 | We want to accept your pull requests. Please follow these steps:
|
21 |
|
22 | ### Step 1: File an issue
|
23 |
|
24 | Before writing any code, please file an issue stating the problem you want to solve or the feature you want to implement. This allows us to give you feedback before you spend any time writing code. There may be a known limitation that can't be addressed, or a bug that has already been fixed in a different way. The issue allows us to communicate and figure out if it's worth your time to write a bunch of code for the project.
|
25 |
|
26 | ### Step 2: Fork this repository in GitHub
|
27 |
|
28 | This will create your own copy of our repository.
|
29 |
|
30 | ### Step 3: Add the upstream source
|
31 |
|
32 | The upstream source is the project under the Box organization on GitHub. To add an upstream source for this project, type:
|
33 |
|
34 | ```
|
35 | git remote add upstream git@github.com:box/eos.git
|
36 | ```
|
37 |
|
38 | This will come in useful later.
|
39 |
|
40 | ### Step 4: Create a feature branch
|
41 |
|
42 | Create a branch with a descriptive name, such as `add-search`.
|
43 |
|
44 | ### Step 5: Push your feature branch to your fork
|
45 |
|
46 | As you develop code, continue to push code to your remote feature branch. Please make sure to include the issue number you're addressing in your commit message, such as:
|
47 |
|
48 | ```
|
49 | git commit -m "Adding search (fixes #123)"
|
50 | ```
|
51 |
|
52 | This helps us out by allowing us to track which issue your commit relates to.
|
53 |
|
54 | Keep a separate feature branch for each issue you want to address.
|
55 |
|
56 | ### Step 6: Rebase
|
57 |
|
58 | Before sending a pull request, rebase against upstream, such as:
|
59 |
|
60 | ```
|
61 | git fetch upstream
|
62 | git rebase upstream/master
|
63 | ```
|
64 |
|
65 | This will add your changes on top of what's already in upstream, minimizing merge issues.
|
66 |
|
67 | ### Step 7: Run the tests
|
68 |
|
69 | Make sure that all tests are passing before submitting a pull request.
|
70 |
|
71 | ### Step 8: Send the pull request
|
72 |
|
73 | Send the pull request from your feature branch to us. Be sure to include a description that lets us know what work you did.
|
74 |
|
75 | Keep in mind that we like to see one issue addressed per pull request, as this helps keep our git history clean and we can more easily track down issues.
|