# Ignore comments
ignore_regexps = [
        r'@minor', r'!minor',
        r'@cosmetic', r'!cosmetic',
        r'@refactor', r'!refactor',
        r'@wip', r'!wip',
        r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
  ]
# Detect sections
section_regexps = [
    ('New features', [
    r'^[fF]eat(\(.*\)?):.+([^\n]*)$',
     ]),
    ('Fix', [
    r'^[Ff]ix(\(\w*\)?):.+([^\n]*)$',
     ]),
    ('Refactor', [
    r'^[Rr]efactor(\(\w*\)?):.+([^\n]*)$',
     ]),
    ('Documentation', [
    r'^[Dd]ocs?(\(\w*\)?):.+([^\n]*)$',
     ]),
    ('Other', None ## Match all lines
     ),
]
# Rewrite body
body_process = (ReSub(r'.*', '') |
                ReSub(r'^(\n|\r)$', ''))
# Rewrite subject
subject_process = (strip |
    ReSub(r'^(\w+)(\((.*)\):\s?([^\n@]*))(@[a-z]+\s+)*$', r'*\3*: \4') |
    ReSub(r'^\*\*: ', '') |
    ReSub(r'#INF-(\d+)', r'(`#INF-\1 <https://ticketingserver/INF-\1>`_)') |
    ReSub(r'\) \(', ' ') |
    ReSub(r' (#noticket|#nt)', '') |
    strip | ucfirst | final_dot)
# Detect tags
tag_filter_regexp = r'^v[0-9]+\.[0-9]+(\.[0-9]+)?$'
unreleased_version_label = "Next version (unreleased yet)"
# Generate markdown
output_engine = rest_py
include_merges = True
