|
| 1 | +# Contributing to the Project |
| 2 | + |
| 3 | +This document contains and defines the rules that have to be followed by any |
| 4 | +contributor to the project, in order for any change to be merged into the |
| 5 | +stable branches. |
| 6 | + |
| 7 | +## Workflow Guidelines |
| 8 | + |
| 9 | +### Branching Guidelines |
| 10 | + |
| 11 | +When branching, the branch name should have one of the following prefixes: |
| 12 | + |
| 13 | +* improvement/ |
| 14 | +* bugfix/ |
| 15 | +* feature/ |
| 16 | + |
| 17 | +Additionally, the branch name should also contain a reference to the issue |
| 18 | +being tackled. For example, a branch tackling issue 123 introducing the new |
| 19 | +feature FooBar might be named `feature/GH-123-add-shiny-new-feature-FooBar`. |
| 20 | + |
| 21 | + |
| 22 | +### Committing Guidelines |
| 23 | + |
| 24 | +No restrictions are placed at this time on individual commits passing in the |
| 25 | +CI and/or maintaining full functionality of the repository. |
| 26 | + |
| 27 | +Commit messages should: |
| 28 | + |
| 29 | +* have a short (< 50 characters) summary as title |
| 30 | +* contain more explanations, if necessary, in the body |
| 31 | +* contain a reference to the issue being tackled in the body |
| 32 | + |
| 33 | +A commit message should *not* contain a reference to the issue in the title. |
| 34 | + |
| 35 | +### Pull Request Guidelines |
| 36 | + |
| 37 | +Pull requests should contain in their body a reference to the GitHub issue |
| 38 | +being targeted by the changeset introduced. |
| 39 | + |
| 40 | +### Signing your work |
| 41 | + |
| 42 | +In order to contribute to the project, you must sign your work. By signing your |
| 43 | +work, you certify to the statements set out in the Developer Certificate of |
| 44 | +Origin ([developercertificate.org](https://developercertificate.org/)) |
| 45 | + |
| 46 | +Signing your work is easy. Just add the following line at the end of each of |
| 47 | +your commit messages. You must use your real name in your sign-off. |
| 48 | + |
| 49 | +``` |
| 50 | +Signed-off-by: Jane Doe <jane.doe@email.com> |
| 51 | +``` |
| 52 | + |
| 53 | +If your `user.name` and `user.email` are set in your git configs, you can sign |
| 54 | +each commit automatically by using the `git commit -s` command. |
| 55 | + |
| 56 | +## Reporting an issue |
| 57 | + |
| 58 | +This project uses Github issues to manage the issues. |
| 59 | + |
| 60 | +Before creating an issue: |
| 61 | + |
| 62 | +1. upgrade the operator to the latest supported release version, and check whether your bug is still present, |
| 63 | +2. ensure the operator version is supported by the PowerDNS version you are using, |
| 64 | +3. have a look in the opened issues if your problem is already known/tracked, and possibly contribute to the thread with your own information. |
| 65 | + |
| 66 | +If none of the above was met, open an issue directly in Github, select the appropriate issue template and fill-in each section when applicable. |
| 67 | + |
| 68 | +## Testing & Linting |
| 69 | + |
| 70 | +Run tests and lint the code: |
| 71 | +```go |
| 72 | +go test -v ./... |
| 73 | +golangci-lint run |
| 74 | +``` |
0 commit comments