|
| 1 | +## |
| 2 | +## Format |
| 3 | +## |
| 4 | +## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...] |
| 5 | +## |
| 6 | +## Description |
| 7 | +## |
| 8 | +## ACTION is one of 'chg', 'fix', 'new' |
| 9 | +## |
| 10 | +## Is WHAT the change is about. |
| 11 | +## |
| 12 | +## 'chg' is for refactor, small improvement, cosmetic changes... |
| 13 | +## 'fix' is for bug fixes |
| 14 | +## 'new' is for new features, big improvement |
| 15 | +## |
| 16 | +## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc' |
| 17 | +## |
| 18 | +## Is WHO is concerned by the change. |
| 19 | +## |
| 20 | +## 'dev' is for developpers (API changes, refactors...) |
| 21 | +## 'usr' is for final users (UI changes) |
| 22 | +## 'pkg' is for packagers (packaging changes) |
| 23 | +## 'test' is for testers (test only related changes) |
| 24 | +## 'doc' is for doc guys (doc only changes) |
| 25 | +## |
| 26 | +## COMMIT_MSG is ... well ... the commit message itself. |
| 27 | +## |
| 28 | +## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic' |
| 29 | +## |
| 30 | +## They are preceded with a '!' or a '@' (prefer the former, as the |
| 31 | +## latter is wrongly interpreted in github.) Commonly used tags are: |
| 32 | +## |
| 33 | +## 'refactor' is obviously for refactoring code only |
| 34 | +## 'minor' is for a very meaningless change (a typo, adding a comment) |
| 35 | +## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...) |
| 36 | +## 'wip' is for partial functionality but complete subfunctionality. |
| 37 | +## |
| 38 | +## Example: |
| 39 | +## |
| 40 | +## new: usr: support of bazaar implemented |
| 41 | +## chg: re-indentend some lines !cosmetic |
| 42 | +## new: dev: updated code to be compatible with last version of killer lib. |
| 43 | +## fix: pkg: updated year of licence coverage. |
| 44 | +## new: test: added a bunch of test around user usability of feature X. |
| 45 | +## fix: typo in spelling my name in comment. !minor |
| 46 | +## |
| 47 | +## Please note that multi-line commit message are supported, and only the |
| 48 | +## first line will be considered as the "summary" of the commit message. So |
| 49 | +## tags, and other rules only applies to the summary. The body of the commit |
| 50 | +## message will be displayed in the changelog without reformatting. |
| 51 | + |
| 52 | + |
| 53 | +## |
| 54 | +## ``ignore_regexps`` is a line of regexps |
| 55 | +## |
| 56 | +## Any commit having its full commit message matching any regexp listed here |
| 57 | +## will be ignored and won't be reported in the changelog. |
| 58 | +## |
| 59 | +ignore_regexps = [ |
| 60 | + r'@minor', r'!minor', |
| 61 | + r'@cosmetic', r'!cosmetic', |
| 62 | + r'@refactor', r'!refactor', |
| 63 | + r'@wip', r'!wip', |
| 64 | + r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:', |
| 65 | + r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:', |
| 66 | + r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$', |
| 67 | + ] |
| 68 | + |
| 69 | + |
| 70 | +## ``section_regexps`` is a list of 2-tuples associating a string label and a |
| 71 | +## list of regexp |
| 72 | +## |
| 73 | +## Commit messages will be classified in sections thanks to this. Section |
| 74 | +## titles are the label, and a commit is classified under this section if any |
| 75 | +## of the regexps associated is matching. |
| 76 | +## |
| 77 | +section_regexps = [ |
| 78 | + ('New', [ |
| 79 | + r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', |
| 80 | + ]), |
| 81 | + ('Changes', [ |
| 82 | + r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', |
| 83 | + ]), |
| 84 | + ('Fix', [ |
| 85 | + r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', |
| 86 | + ]), |
| 87 | + |
| 88 | + ('Other', None ## Match all lines |
| 89 | + ), |
| 90 | + |
| 91 | +] |
| 92 | + |
| 93 | + |
| 94 | +## ``body_process`` is a callable |
| 95 | +## |
| 96 | +## This callable will be given the original body and result will |
| 97 | +## be used in the changelog. |
| 98 | +## |
| 99 | +## Available constructs are: |
| 100 | +## |
| 101 | +## - any python callable that take one txt argument and return txt argument. |
| 102 | +## |
| 103 | +## - ReSub(pattern, replacement): will apply regexp substitution. |
| 104 | +## |
| 105 | +## - Indent(chars=" "): will indent the text with the prefix |
| 106 | +## Please remember that template engines gets also to modify the text and |
| 107 | +## will usually indent themselves the text if needed. |
| 108 | +## |
| 109 | +## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns |
| 110 | +## |
| 111 | +## - noop: do nothing |
| 112 | +## |
| 113 | +## - ucfirst: ensure the first letter is uppercase. |
| 114 | +## (usually used in the ``subject_process`` pipeline) |
| 115 | +## |
| 116 | +## - final_dot: ensure text finishes with a dot |
| 117 | +## (usually used in the ``subject_process`` pipeline) |
| 118 | +## |
| 119 | +## - strip: remove any spaces before or after the content of the string |
| 120 | +## |
| 121 | +## Additionally, you can `pipe` the provided filters, for instance: |
| 122 | +#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ") |
| 123 | +#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') |
| 124 | +#body_process = noop |
| 125 | +body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip |
| 126 | + |
| 127 | + |
| 128 | +## ``subject_process`` is a callable |
| 129 | +## |
| 130 | +## This callable will be given the original subject and result will |
| 131 | +## be used in the changelog. |
| 132 | +## |
| 133 | +## Available constructs are those listed in ``body_process`` doc. |
| 134 | +subject_process = (strip | |
| 135 | + ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') | |
| 136 | + ucfirst | final_dot) |
| 137 | + |
| 138 | + |
| 139 | +## ``tag_filter_regexp`` is a regexp |
| 140 | +## |
| 141 | +## Tags that will be used for the changelog must match this regexp. |
| 142 | +## |
| 143 | +tag_filter_regexp = r'^v[0-9]+\.[0-9]+(\.[0-9]+)?$' |
| 144 | + |
| 145 | + |
| 146 | +## ``unreleased_version_label`` is a string |
| 147 | +## |
| 148 | +## This label will be used as the changelog Title of the last set of changes |
| 149 | +## between last valid tag and HEAD if any. |
| 150 | +unreleased_version_label = "%%version%% (unreleased)" |
| 151 | + |
| 152 | + |
| 153 | +## ``output_engine`` is a callable |
| 154 | +## |
| 155 | +## This will change the output format of the generated changelog file |
| 156 | +## |
| 157 | +## Available choices are: |
| 158 | +## |
| 159 | +## - rest_py |
| 160 | +## |
| 161 | +## Legacy pure python engine, outputs ReSTructured text. |
| 162 | +## This is the default. |
| 163 | +## |
| 164 | +## - mustache(<template_name>) |
| 165 | +## |
| 166 | +## Template name could be any of the available templates in |
| 167 | +## ``templates/mustache/*.tpl``. |
| 168 | +## Requires python package ``pystache``. |
| 169 | +## Examples: |
| 170 | +## - mustache("markdown") |
| 171 | +## - mustache("restructuredtext") |
| 172 | +## |
| 173 | +## - makotemplate(<template_name>) |
| 174 | +## |
| 175 | +## Template name could be any of the available templates in |
| 176 | +## ``templates/mako/*.tpl``. |
| 177 | +## Requires python package ``mako``. |
| 178 | +## Examples: |
| 179 | +## - makotemplate("restructuredtext") |
| 180 | +## |
| 181 | +output_engine = rest_py |
| 182 | +#output_engine = mustache("restructuredtext") |
| 183 | +#output_engine = mustache("markdown") |
| 184 | +#output_engine = makotemplate("restructuredtext") |
| 185 | + |
| 186 | + |
| 187 | +## ``include_merge`` is a boolean |
| 188 | +## |
| 189 | +## This option tells git-log whether to include merge commits in the log. |
| 190 | +## The default is to include them. |
| 191 | +include_merge = True |
0 commit comments