diff --git a/docs/source/contributing.md b/docs/source/contributing.md index b2e0c8de6fe..b9f5b9c37d1 100644 --- a/docs/source/contributing.md +++ b/docs/source/contributing.md @@ -120,6 +120,38 @@ git rebase -i HEAD~5 Once your commit history is clean, ensure you have based on the [latest upstream](#updating-your-fork) before you open the PR. +### Commit messages + +Please make the first line of your commit message a summary of the change that a user (not a developer) of Operator would like to read, +and prefix it with the most relevant directory of the change followed by a colon. +The changelog gets made by looking at just these first lines so make it good! + +If you have more to say about the commit, then enter a blank line and carry on the description. +Remember to say why the change was needed - the commit itself shows what was changed. + +Writing more is better than less. Comparing the behaviour before the change to that after the change is very useful. +Imagine you are writing to yourself in 12 months time when you've forgotten everything about what you just did, and you need to get up to speed quickly. + +If the change fixes an issue then write Fixes #1234 in the commit message. +This can be on the subject line if it will fit. If you don't want to close the associated issue just put #1234 and the change will get linked into the issue. + +Here is an example of a short commit message: + +``` +sidecar: log on reconcile loop - fixes #1234 +``` + +And here is an example of a longer one: +``` + +api: now supports host networking (#1234) + +The operator CRD now has a "network" property that can be used to +select host networking as well as setting the apropriate DNS policy. + +Fixes #1234 +``` + ### Submitting Go to the [Scylla Operator github](https://www.github.com/scylladb/scylla-operator) to open the PR. If you have pushed recently, you should see an obvious link to open the PR. If you have not pushed recently, go to the Pull Request tab and select your fork and branch for the PR.