summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-10 15:07:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-08-10 15:07:46 (GMT)
commit14b2f85cd411ee9d7e19a28d5e2ea7958ab845ee (patch)
tree8e1bf842df7012d6ad0ddbf261b1c7b83d38bec2 /Help
parenta7e95f737d9986e9ccea1229d925d7036ba4421f (diff)
parent11d00a17aafb33385a57a11b53862ac2197f116f (diff)
downloadCMake-14b2f85cd411ee9d7e19a28d5e2ea7958ab845ee.zip
CMake-14b2f85cd411ee9d7e19a28d5e2ea7958ab845ee.tar.gz
CMake-14b2f85cd411ee9d7e19a28d5e2ea7958ab845ee.tar.bz2
Merge topic 'commit_message_guidelines'
11d00a17 Help/dev: Add commit message guidelines Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1106
Diffstat (limited to 'Help')
-rw-r--r--Help/dev/review.rst48
1 files changed, 48 insertions, 0 deletions
diff --git a/Help/dev/review.rst b/Help/dev/review.rst
index 9450bf0..985b1b7 100644
--- a/Help/dev/review.rst
+++ b/Help/dev/review.rst
@@ -185,6 +185,54 @@ commands to ``@kwrobot`` using the form ``Do: ...``:
See the corresponding sections for details on permissions and options
for each command.
+Commit Messages
+---------------
+
+Part of the human review is to check that each commit message is appropriate.
+The first line of the message should begin with one or two words indicating the
+area the commit applies to, followed by a colon and then a brief summary.
+Committers should aim to keep this first line short. Any subsequent lines
+should be separated from the first by a blank line and provide relevant, useful
+information.
+
+The appropriateness of the initial word describing the area the commit applies
+to is not something the automatic robot review can judge, so it is up to the
+human reviewer to confirm that the area is specified and that it is
+appropriate. Good area words include the module name the commit is primarily
+fixing, the main C++ source file being edited, ``Help`` for generic
+documentation changes or a feature or functionality theme the changes apply to
+(e.g. ``server`` or ``Autogen``). Examples of suitable first lines of a commit
+message include:
+
+* ``Help: Fix example in cmake-buildsystem(7) manual``
+* ``FindBoost: Add support for 1.64``
+* ``Autogen: Extended mocInclude tests``
+* ``cmLocalGenerator: Explain standard flag selection logic in comments``
+
+If the commit fixes a particular reported issue, this information should
+ideally also be part of the commit message. The recommended way to do this is
+to place a line at the end of the message in the form ``Fixes: #xxxxx`` where
+``xxxxx`` is the GitLab issue number and to separate it from the rest of the
+text by a blank line. For example::
+
+ Help: Fix FooBar example robustness issue
+
+ FooBar supports option X, but the example provided
+ would not work if Y was also specified.
+
+ Fixes: #12345
+
+GitLab will automatically create relevant links to the merge request and will
+close the issue when the commit is merged into master. GitLab understands a few
+other synonyms for ``Fixes`` and allows much more flexible forms than the
+above, but committers should aim for this format for consistency. Note that
+such details can alternatively be specified in the merge request description.
+
+Reviewers are encouraged to ask the committer to amend commit messages to
+follow these guidelines, but prefer to focus on the changes themselves as a
+first priority. Maintainers will also make a check of commit messages before
+merging.
+
Topic Testing
=============