Skip to content

Commit

Permalink
Introduce changelog metadata in commit messages
Browse files Browse the repository at this point in the history
Thanks to this, changelog can be automatically generated while staying
useful.
  • Loading branch information
pkratoch authored and lukash committed Jul 27, 2020
1 parent 639c10e commit 8d1f807
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .git-commit-template
Original file line number Diff line number Diff line change
@@ -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

20 changes: 19 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://bugzilla.redhat.com/>`_, append ``(RhBug:<bug_id>)`` to your commit message
#. If the change fixes a bug at `Red Hat bugzilla <https://bugzilla.redhat.com/>`_, 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 <https://github.com/rpm-software-management/dnf/blob/master/AUTHORS>`_ as a reward for your generosity
#. Push the branch up to your fork
#. Send a pull request for your branch
Expand Down

0 comments on commit 8d1f807

Please sign in to comment.