-
Notifications
You must be signed in to change notification settings - Fork 1
/
.changelog-config.yaml
126 lines (112 loc) · 3.43 KB
/
.changelog-config.yaml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# For more configuration information, please see https://callowayproject.github.io/generate-changelog/
# User variables for reference in other parts of the configuration.
variables:
repo_url: https://github.com/callowayproject/generate-changelog
# Pipeline to find the most recent tag for incremental changelog generation.
# Leave empty to always start at first commit.
starting_tag_pipeline:
- action: ReadFile
kwargs:
filename: CHANGELOG.md
- action: FirstRegExMatch
kwargs:
pattern: (?im)^## (?P<rev>\d+\.\d+(?:\.\d+)?)\s+\(\d+-\d{2}-\d{2}\)$
named_subgroup: rev
# Used as the version title of the changes since the last valid tag.
unreleased_label: Unreleased
# Process the commit's first line for use in the changelog.
summary_pipeline:
- action: strip_spaces
- action: Strip
comment: Get rid of any periods so we don't get double periods
kwargs:
chars: .
- action: SetDefault
args:
- no commit message
- action: capitalize
- action: append_dot
# Process the commit's body for use in the changelog.
body_pipeline:
- action: ParseTrailers
comment: Parse the trailers into metadata.
kwargs:
commit_metadata: save_commit_metadata
# Process and store the full or partial changelog.
output_pipeline:
- action: IncrementalFileInsert
kwargs:
filename: CHANGELOG.md
last_heading_pattern: (?im)^## \d+\.\d+(?:\.\d+)?\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)$
# Full or relative paths to look for output generation templates.
template_dirs:
- ".github/changelog_templates/"
# Group the commits within a version by these commit attributes.
group_by:
- metadata.category
# Only tags matching this regular expression are used for the changelog.
tag_pattern: ^[0-9]+\.[0-9]+(?:\.[0-9]+)?$
# Tells ``git-log`` whether to include merge commits in the log.
include_merges: false
# Ignore commits whose summary line matches any of these regular expression patterns.
ignore_patterns:
- '[@!]minor'
- '[@!]cosmetic'
- '[@!]refactor'
- '[@!]wip'
- ^$
- ^Merge branch
- ^Merge pull
- ^Version updated
# Set the commit's category metadata to the first classifier that returns ``True``.
commit_classifiers:
- action: SummaryRegexMatch
category: New
kwargs:
pattern: (?i)^(?:new|add)[^\n]*$
- action: SummaryRegexMatch
category: Updates
kwargs:
pattern: (?i)^(?:update|change|rename|remove|delete|improve|refactor|chg|modif)[^\n]*$
- action: SummaryRegexMatch
category: Fixes
kwargs:
pattern: (?i)^(?:fix)[^\n]*$
- action:
category: Other
# Tokens in git commit trailers that indicate authorship.
valid_author_tokens:
- author
- based-on-a-patch-by
- based-on-patch-by
- co-authored-by
- co-committed-by
- contributions-by
- from
- helped-by
- improved-by
- original-patch-by
# Rules applied to commits to determine the type of release to suggest.
release_hint_rules:
- match_result: dev
branch: ^((?!master|main).)*$
- match_result: patch
grouping: Other
branch: master|main
path: generate_changelog/*
- match_result: patch
grouping: Fixes
branch: master|main
path: generate_changelog/*
- match_result: minor
grouping: Updates
branch: master|main
path: generate_changelog/*
- match_result: minor
grouping: New
path: generate_changelog/*
branch: master|main
- match_result: major
grouping: Breaking Changes
path: generate_changelog/*
branch: master|main