summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-08-13 04:25:16 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2019-08-13 04:25:16 +0000
commitfa70d12f0372bffff12d4385d465fe4b1c8d7a8e (patch)
tree55cbbcf113a52b170946e6d1ab44552144f9c1b2
parent6680cc4ea2393955a60d042137e546e627cf8e32 (diff)
parent94a759423434cc06e27beee7387957f0c5a70c6c (diff)
downloadgitlab-ce-fa70d12f0372bffff12d4385d465fe4b1c8d7a8e.tar.gz
Merge branch '65701-Add-Gitmessage-Template' into 'master'
Add sample gitmessage template to the merge request guide Closes #65701 See merge request gitlab-org/gitlab-ce!31540
-rw-r--r--doc/development/contributing/merge_request_workflow.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md
index 17328762c5b..4e9c5c81379 100644
--- a/doc/development/contributing/merge_request_workflow.md
+++ b/doc/development/contributing/merge_request_workflow.md
@@ -143,6 +143,37 @@ If the guidelines are not met, the MR will not pass the
[Danger checks](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/danger/commit_messages/Dangerfile).
For more information see [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/).
+Example commit message template that can be used on your machine that embodies the above (guide for [how to apply template](https://codeinthehole.com/tips/a-useful-template-for-commit-messages/)):
+
+```text
+# (If applied, this commit will...) <subject> (Max 50 char)
+# |<---- Using a Maximum Of 50 Characters ---->|
+
+
+# Explain why this change is being made
+# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
+
+# Provide links or keys to any relevant tickets, articles or other resources
+# Use issues and merge requests' full URLs instead of short references,
+# as they are displayed as plain text outside of GitLab
+
+# --- COMMIT END ---
+# --------------------
+# Remember to
+# Capitalize the subject line
+# Use the imperative mood in the subject line
+# Do not end the subject line with a period
+# Subject must contain at least 3 words
+# Separate subject from body with a blank line
+# Commits that change 30 or more lines across at least 3 files must
+# describe these changes in the commit body
+# Do not use Emojis
+# Use the body to explain what and why vs. how
+# Can use multiple lines with "-" for bullet points in body
+# For more information: https://chris.beams.io/posts/git-commit/
+# --------------------
+```
+
## Contribution acceptance criteria
To make sure that your merge request can be approved, please ensure that it meets