-
Notifications
You must be signed in to change notification settings - Fork 59
/
.gitchangelog.rc
102 lines (94 loc) · 3.51 KB
/
.gitchangelog.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# -*- mode: python; -*-
## refer from https://github.com/vaab/gitchangelog/blob/master/src/gitchangelog/gitchangelog.rc.reference
## ``section_regexps`` is a list of 2-tuples associating a string label and a
## list of regexp
##
## Commit messages will be classified in sections thanks to this. Section
## titles are the label, and a commit is classified under this section if any
## of the regexps associated is matching.
section_regexps = [
('New', [
r'^([fF]eat)(\([a-zA-Z\-\s,]+\))?\s*:\s*.*$'
]),
('Changes', [
r'^([cC]hore|[dD]oc|[rR]efactor)(\([a-zA-Z\-\s,]+\))?\s*:\s*.*$'
]),
('Fix', [
r'^([fF]ix)(\([a-zA-Z\-\s,]+\))?\s*:\s*.*$'
]),
('Security', [
r'^([sS]ecurity|[sS]ecure)(\([a-zA-Z\-\s,]+\))?\s*:\s*.*$'
]),
# Not generate other changes
# ('Other', None ## Match all lines
# ),
]
## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = False
## ``body_process`` is a callable
##
## This callable will be given the original body and result will
## be used in the changelog.
##
## Available constructs are:
##
## - any python callable that take one txt argument and return txt argument.
##
## - ReSub(pattern, replacement): will apply regexp substitution.
##
## - Indent(chars=" "): will indent the text with the prefix
## Please remember that template engines gets also to modify the text and
## will usually indent themselves the text if needed.
##
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
##
## - noop: do nothing
##
## - ucfirst: ensure the first letter is uppercase.
## (usually used in the ``subject_process`` pipeline)
##
## - final_dot: ensure text finishes with a dot
## (usually used in the ``subject_process`` pipeline)
##
## - strip: remove any spaces before or after the content of the string
##
## - SetIfEmpty(msg="No commit message."): will set the text to
## whatever given ``msg`` if the current text is empty.
##
## Additionally, you can `pipe` the provided filters, for instance:
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
## Skip body here
body_process = ReSub(r'.*', r'') | strip
## ``subject_process`` is a callable
##
## This callable will be given the original subject and result will
## be used in the changelog.
##
## Available constructs are those listed in ``body_process`` doc.
subject_process = (strip |
ReSub(r'\r', r'') |
SetIfEmpty("No commit message.") | ucfirst | final_dot)
## ``tag_filter_regexp`` is a regexp
## Tags that will be used for the changelog must match this regexp.
# Match ODC release tag style
tag_filter_regexp = r'^v([0-9]+\.[0-9]+\.[0-9]+)(_[a-z0-9]+)?$'
## ``revs`` is a list of callable or a list of string
##
## callable will be called to resolve as strings and allow dynamical
## computation of these. The result will be used as revisions for
## gitchangelog (as if directly stated on the command line). This allows
## to filter exaclty which commits will be read by gitchangelog.
##
## To get a full documentation on the format of these strings, please
## refer to the ``git rev-list`` arguments. There are many examples.
##
## Using callables is especially useful, for instance, if you
## are using gitchangelog to generate incrementally your changelog.
# ODC v2.0.0 start from v4.2.0
revs = ["v4.2.0..HEAD"]
unreleased_version_label = "(unreleased)"