From 8d1f807bd0988d6117aac7d09a2c5b48a6735c11 Mon Sep 17 00:00:00 2001 From: Pavla Kratochvilova Date: Fri, 24 Jul 2020 09:41:57 +0200 Subject: [PATCH] Introduce changelog metadata in commit messages Thanks to this, changelog can be automatically generated while staying useful. --- .git-commit-template | 16 ++++++++++++++++ README.rst | 20 +++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .git-commit-template diff --git a/.git-commit-template b/.git-commit-template new file mode 100644 index 0000000000..23b7406685 --- /dev/null +++ b/.git-commit-template @@ -0,0 +1,16 @@ + + +# In addition to regular commit message, you can uncomment and fill in the +# following to include this change in the released RPM package changelog: + +# = changelog = +# msg: +# type: +# resolves: +# related: + +# msg = message to be included in the changelog +# type = one of: bugfix/enhancement/security +# resolves = URLs to bugs or issues resolved by this commit +# related = URLs to any related bugs or issues + diff --git a/README.rst b/README.rst index cf0a2f50f7..69aad8f483 100644 --- a/README.rst +++ b/README.rst @@ -88,7 +88,25 @@ Here's the most direct way to get your work merged into the project. 1. Fork the project #. Clone down your fork #. Implement your feature or bug fix and commit changes -#. If you reported a bug or you know it fixes existing bug at `Red Hat bugzilla `_, append ``(RhBug:)`` to your commit message +#. If the change fixes a bug at `Red Hat bugzilla `_, or if it is important to the end user, add the following block to the commit message:: + + = changelog = + msg: message to be included in the changelog + type: one of: bugfix/enhancement/security (this field is required when message is present) + resolves: URLs to bugs or issues resolved by this commit (can be specified multiple times) + related: URLs to any related bugs or issues (can be specified multiple times) + + * For example:: + + = changelog = + msg: Verify GPG signatures when running dnf-automatic + type: bugfix + resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1793298 + + * For your convenience, you can also use git commit template by running the following command in the top-level directory of this project:: + + git config commit.template ./.git-commit-template + #. In special commit add your name and email under ``DNF CONTRIBUTORS`` section in `authors file `_ as a reward for your generosity #. Push the branch up to your fork #. Send a pull request for your branch