Skip to content

Commit ee04163

Browse files
authored
Add dependency changelog type (#579)
* Add dependency changelog type * formatter
1 parent d9b9e2b commit ee04163

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

scripts/changelog/new-entry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def main():
5555
"-t",
5656
"--type",
5757
# TODO: Remove the 'breaking' option once this project is stable.
58-
choices=("feature", "enhancement", "bugfix", "breaking"),
58+
choices=("feature", "enhancement", "bugfix", "breaking", "dependency"),
5959
required=True,
6060
help="Type of change",
6161
)

scripts/changelog/new-release.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515

1616
PROJECT_ROOT_DIR = Path(__file__).resolve().parent.parent.parent
1717
VERSION_PATTERN = r"^\d+\.\d+\.\d+$"
18-
CHANGE_TYPES_ORDER = {"breaking": 0, "feature": 1, "enhancement": 2, "bugfix": 3}
18+
CHANGE_TYPES_ORDER = {
19+
"breaking": 0,
20+
"feature": 1,
21+
"enhancement": 2,
22+
"bugfix": 3,
23+
"dependency": 4,
24+
}
1925
CHANGE_TYPES = tuple(CHANGE_TYPES_ORDER.keys())
2026

2127

scripts/changelog/templates/PACKAGE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changelog
22
{% for release, changes in releases %}
33
## v{{ release }}
4-
{%- for type_name in ['breaking', 'feature', 'enhancement', 'bugfix'] %}
4+
{%- for type_name in ['breaking', 'feature', 'enhancement', 'bugfix', 'dependency'] %}
55
{%- for change in changes.changes if change.type == type_name %}
66
{%- if loop.first %}
77
{%- if type_name == 'breaking' %}
@@ -16,6 +16,9 @@
1616
{%- elif type_name == 'bugfix' %}
1717

1818
### Bug fixes
19+
{%- elif type_name == 'dependency' %}
20+
21+
### Dependencies
1922
{%- endif %}
2023
{%- endif %}
2124
* {{ change.description }}

0 commit comments

Comments
 (0)