|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Everyone is welcome to contribute to GoDaddy's Open Source Software. |
| 4 | +Contributing doesn’t just mean submitting pull requests. To get involved, |
| 5 | +you can report or triage bugs, and participate in discussions on the |
| 6 | +evolution of each project. |
| 7 | + |
| 8 | +No matter how you want to get involved, we ask that you first learn what’s |
| 9 | +expected of anyone who participates in the project by reading the Contribution |
| 10 | +Guidelines and our [Code of Conduct][coc]. |
| 11 | + |
| 12 | +**Please Note:** GitHub is for bug reports and contributions primarily - |
| 13 | +if you have a support question head over to [GoDaddy's Open Source |
| 14 | +Software Slack channel][slack]. You can request an invite |
| 15 | +[here][invite]. |
| 16 | + |
| 17 | +## Answering Questions |
| 18 | + |
| 19 | +One of the most important and immediate ways you can support this project is |
| 20 | +to answer questions on [Slack][slack] or [Github][issues]. Whether you’re |
| 21 | +helping a newcomer understand a feature or troubleshooting an edge case with a |
| 22 | +seasoned developer, your knowledge and experience with a programming language |
| 23 | +can go a long way to help others. |
| 24 | + |
| 25 | +## Reporting Bugs |
| 26 | + |
| 27 | +**Do not report potential security vulnerabilities here. Refer to |
| 28 | +[SECURITY.md](./SECURITY.md) for more details about the process of reporting |
| 29 | +security vulnerabilities.** |
| 30 | + |
| 31 | +Before submitting a ticket, please search our [Issue Tracker][issues] to make |
| 32 | +sure it does not already exist and have a simple replication of the behavior. If |
| 33 | +the issue is isolated to one of the dependencies of this project, please create |
| 34 | +a Github issue in that project. All dependencies should be open source software |
| 35 | +and can be found on Github. |
| 36 | + |
| 37 | +Submit a ticket for your issue, assuming one does not already exist: |
| 38 | + |
| 39 | +- Create it on the project's [issue Tracker][issues]. |
| 40 | +- Clearly describe the issue by following the template layout |
| 41 | + - Make sure to include steps to reproduce the bug. |
| 42 | + - A reproducible (unit) test could be helpful in solving the bug. |
| 43 | + - Describe the environment that (re)produced the problem. |
| 44 | + |
| 45 | +## Triaging bugs or contributing code |
| 46 | + |
| 47 | +If you're triaging a bug, first make sure that you can reproduce it. Once a bug |
| 48 | +can be reproduced, reduce it to the smallest amount of code possible. Reasoning |
| 49 | +about a sample or unit test that reproduces a bug in just a few lines of code |
| 50 | +is easier than reasoning about a longer sample. |
| 51 | + |
| 52 | +From a practical perspective, contributions are as simple as: |
| 53 | + |
| 54 | +1. Fork and clone the repo, [see Github's instructions if you need help.][fork] |
| 55 | +1. Create a branch for your PR with `git checkout -b pr/your-branch-name` |
| 56 | +1. Make changes on the branch of your forked repository. |
| 57 | +1. When committing, reference your issue (if present) and include a note about |
| 58 | + the fix. |
| 59 | +1. Please also add/update unit tests for your changes. |
| 60 | +1. Push the changes to your fork and submit a pull request to the 'main |
| 61 | + development branch' branch of the projects' repository. |
| 62 | + |
| 63 | +If you are interested in making a large change and feel unsure about its overall |
| 64 | +effect, start with opening an Issue in the project's [Issue Tracker][issues] |
| 65 | +with a high-level proposal and discuss it with the core contributors through |
| 66 | +Github comments or in [Slack][slack]. After reaching a consensus with core |
| 67 | +contributors about the change, discuss the best way to go about implementing it. |
| 68 | + |
| 69 | +> Tip: Keep your main branch pointing at the original repository and make |
| 70 | +> pull requests from branches on your fork. To do this, run: |
| 71 | +> |
| 72 | +> ```sh |
| 73 | +> git remote add upstream https://github.com/godaddy/cobhan-python.git |
| 74 | +> git fetch upstream |
| 75 | +> git branch --set-upstream-to=upstream/main main |
| 76 | +> ``` |
| 77 | +> |
| 78 | +> This will add the original repository as a "remote" called "upstream," Then |
| 79 | +> fetch the git information from that remote, then set your local main |
| 80 | +> branch to use the upstream main branch whenever you run git pull. Then you |
| 81 | +> can make all of your pull request branches based on this main branch. |
| 82 | +> Whenever you want to update your version of main, do a regular git pull. |
| 83 | +
|
| 84 | +## Code Review |
| 85 | +
|
| 86 | +Any open source project relies heavily on code review to improve software |
| 87 | +quality. All significant changes, by all developers, must be reviewed before |
| 88 | +they are committed to the repository. Code reviews are conducted on GitHub |
| 89 | +through comments on pull requests or commits. The developer responsible for a |
| 90 | +code change is also responsible for making all necessary review-related changes. |
| 91 | +
|
| 92 | +Sometimes code reviews will take longer than you would hope for, especially for |
| 93 | +larger features. Here are some accepted ways to speed up review times for your |
| 94 | +patches: |
| 95 | +
|
| 96 | +- Review other people’s changes. If you help out, others will more likely be |
| 97 | +willing to do the same for you. |
| 98 | +- Split your change into multiple smaller changes. The smaller your change, |
| 99 | +the higher the probability that somebody will take a quick look at it. |
| 100 | +- Mention the change on [Slack][slack]. If it is urgent, provide reasons why it |
| 101 | +is important to get this change landed. Remember that you are asking for valuable |
| 102 | +time from other professional developers. |
| 103 | +
|
| 104 | +**Note that anyone is welcome to review and give feedback on a change, but only |
| 105 | +people with commit access to the repository can approve it.** |
| 106 | +
|
| 107 | +## Attribution of Changes |
| 108 | +
|
| 109 | +When contributors submit a change to this project, after that change is |
| 110 | +approved, other developers with commit access may commit it for the author. When |
| 111 | +doing so, it is important to retain correct attribution of the contribution. |
| 112 | +Generally speaking, Git handles attribution automatically. |
| 113 | +
|
| 114 | +## Code Style and Documentation |
| 115 | +
|
| 116 | +Ensure that your contribution follows the standards set by the project's style |
| 117 | +guide with respect to patterns, naming, documentation and testing. |
| 118 | +
|
| 119 | +# Additional Resources |
| 120 | +
|
| 121 | +- [General GitHub Documentation](https://help.github.com/) |
| 122 | +- [GitHub Pull Request documentation](https://help.github.com/send-pull-requests/) |
| 123 | +
|
| 124 | +[issues]: https://github.com/godaddy/cobhan-python/issues/ |
| 125 | +[coc]: ./CODE_OF_CONDUCT.md |
| 126 | +[slack]: https://godaddy-oss.slack.com/ |
| 127 | +[fork]: https://help.github.com/en/articles/fork-a-repo |
| 128 | +[invite]: https://godaddy-oss-slack.herokuapp.com |
0 commit comments