make: git commit template 91/19391/7
authorOle Troan <ot@cisco.com>
Tue, 7 May 2019 08:32:40 +0000 (10:32 +0200)
committerDamjan Marion <dmarion@me.com>
Wed, 29 May 2019 09:03:24 +0000 (09:03 +0000)
Add a commit template for tagging of commits
with a type. Later tooling can then process
the commit log and generate reports of new features
etc.

Usage:

The template is automatically added to the current repository
by make install-dep.
(git config commit.template .git_commit_template.txt)

Type: make
Change-Id: I485d61f9852b7390e4f0539d737ab210f7b0723a
Signed-off-by: Ole Troan <ot@cisco.com>
.git_commit_template.txt [new file with mode: 0644]
Makefile

diff --git a/.git_commit_template.txt b/.git_commit_template.txt
new file mode 100644 (file)
index 0000000..d748e02
--- /dev/null
@@ -0,0 +1,47 @@
+# <feature-name>: <subject>
+# |<----  Using a maximum of 50 characters  ---->|
+#
+# Explain why this change is being made
+# |<----   Try to limit each line to a maximum of 72 characters   ---->|
+
+# Ticket: <JIRA #id>
+# Type: <type>
+# Fixes: <offending-git-commit-id>
+# Change-Id: <sha1>
+# Signed-off-by: <email>
+#
+#
+# --- COMMIT END ---
+#
+# Type can be
+#    feature  (new feature)
+#    fix      (bug fix)
+#    refactor (refactoring production code)
+#    style    (formatting, missing semi colons, etc; no code change)
+#    docs     (changes to documentation)
+#    test     (adding or refactoring tests; no production code change)
+#    make     (change the build process, or tools, or infrastructure)
+#
+# feature-name: Is the name of the VPP feature, plugin or directory.
+#               Commits across multiple components should be split.
+#               E.g. ip, fib, nat, acl, host, api
+#
+# Fixes: If type is fix refers to the original commit (optional).
+# Ticket: Refers to JIRA ticket if it exists (optional).
+#
+# --------------------
+# Remember to:
+#    Lowercase the subject line.
+#    Use the imperative mood in the subject line.
+#    Not end the subject line with a period.
+#    Separate subject from body with a blank line.
+#    Use the body to explain what and why vs. how.
+#    Use multiple lines with "-" for bullet points in body.
+# --------------------
+# Usage:
+#
+# The template is automatically added to the current repository by
+# make install-dep.
+# (git config commit.template .git_commit_template.txt)
+#
+# --------------------
index 8a1eaa2..90ed59f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -321,6 +321,7 @@ else ifeq ($(filter opensuse,$(OS_ID)),$(OS_ID))
 else
        $(error "This option currently works only on Ubuntu, Debian, RHEL, CentOS or openSUSE systems")
 endif
+       git config commit.template .git_commit_template.txt
 
 define make
        @make -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)