Skip to content

Commit 9e08de4

Browse files
pkratochlukash
authored andcommitted
Introduce changelog metadata in commit messages
Add Contribution section into README, including the guidelines for adding changelog metadata to the commit messages. Thanks to this, changelog can be automatically generated while staying useful.
1 parent 9c173f1 commit 9e08de4

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.git-commit-template

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
# In addition to regular commit message, you can uncomment and fill in the
4+
# following to include this change in the released RPM package changelog:
5+
6+
# = changelog =
7+
# msg:
8+
# type:
9+
# resolves:
10+
# related:
11+
12+
# msg = message to be included in the changelog
13+
# type = one of: bugfix/enhancement/security
14+
# resolves = URLs to bugs or issues resolved by this commit
15+
# related = URLs to any related bugs or issues
16+

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,36 @@ Example of run only one specific test: ``PYTHONPATH=`readlink -f ./build/librepo
114114

115115
PYTHONPATH=`readlink -f ./build/librepo/python/python3/` nosetests-3.3 -s -v tests/python/tests/
116116

117+
## Contribution
118+
119+
Here's the most direct way to get your work merged into the project.
120+
121+
1. Fork the project
122+
1. Clone down your fork
123+
1. Implement your feature or bug fix and commit changes
124+
1. 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:
125+
126+
= changelog =
127+
msg: message to be included in the changelog
128+
type: one of: bugfix/enhancement/security (this field is required when message is present)
129+
resolves: URLs to bugs or issues resolved by this commit (can be specified multiple times)
130+
related: URLs to any related bugs or issues (can be specified multiple times)
131+
132+
* For example::
133+
134+
= changelog =
135+
msg: Decode package URL when using for local filename
136+
type: bugfix
137+
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1817130
138+
139+
* For your convenience, you can also use git commit template by running the following command in the top-level directory of this project:
140+
141+
git config commit.template ./.git-commit-template
142+
143+
1. In a separate commit, add your name into the [authors file](https://github.com/rpm-software-management/librepo/blob/master/AUTHORS) as a reward for your generosity
144+
1. Push the branch to your fork
145+
1. Send a pull request for your branch
146+
117147
## Links
118148

119149
* [Red Hat Bugzilla](https://bugzilla.redhat.com/buglist.cgi?query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=VERIFIED&component=librepo)

0 commit comments

Comments
 (0)