| 1 | # Contributing |
| 2 | |
| 3 | First off, thanks for taking the time to contribute! |
| 4 | |
| 5 | Remember that this is open source software so please consider the other people who will read your code. |
| 6 | Make it look nice for them, document your logic in comments and add or update the unit test cases. |
| 7 | |
| 8 | This library is used by various other projects, companies and individuals in live production environments so please discuss any breaking changes with us before making them. |
| 9 | Feel free to join us in the [#pro-bing](https://gophers.slack.com/archives/C019J5E26U8/p1673599762771949) channel of the [Gophers Slack](https://invite.slack.golangbridge.org/). |
| 10 | |
| 11 | ## Pull Requests |
| 12 | |
| 13 | [Fork the repo on GitHub](https://github.com/prometheus-community/pro-bing/fork) and clone it to your local machine. |
| 14 | |
| 15 | ```bash |
| 16 | git clone https://github.com/YOUR_USERNAME/pro-bing.git && cd pro-bing |
| 17 | ``` |
| 18 | |
| 19 | Here is a guide on [how to configure a remote repository](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork). |
| 20 | |
| 21 | Check out a new branch, make changes, run tests, commit & sign-off, then push branch to your fork. |
| 22 | |
| 23 | ```bash |
| 24 | $ git checkout -b <BRANCH_NAME> |
| 25 | # edit files |
| 26 | $ make style vet test |
| 27 | $ git add <CHANGED_FILES> |
| 28 | $ git commit -s |
| 29 | $ git push <FORK> <BRANCH_NAME> |
| 30 | ``` |
| 31 | |
| 32 | Open a [new pull request](https://github.com/prometheus-community/pro-bing/compare) in the main `prometheus-community/pro-bing` repository. |
| 33 | Please describe the purpose of your PR and remember link it to any related issues. |
| 34 | |
| 35 | *We may ask you to rebase your feature branch or squash the commits in order to keep the history clean.* |
| 36 | |
| 37 | ## Development Guides |
| 38 | |
| 39 | - Run `make style vet test` before committing your changes. |
| 40 | - Document your logic in code comments. |
| 41 | - Add tests for bug fixes and new features. |
| 42 | - Use UNIX-style (LF) line endings. |
| 43 | - End every file with a single blank line. |
| 44 | - Use the UTF-8 character set. |