Skip to content

Commit 00930e6

Browse files
committed
fix(changelog): use defaults.change_type_order in conventional commit
1 parent adcdce5 commit 00930e6

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

commitizen/commands/changelog.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from operator import itemgetter
44
from typing import Callable, Dict, List, Optional
55

6-
from commitizen import changelog, factory, git, out
6+
from commitizen import changelog, defaults, factory, git, out
77
from commitizen.config import BaseConfig
88
from commitizen.exceptions import (
99
DryRunExit,
@@ -45,7 +45,9 @@ def __init__(self, config: BaseConfig, args):
4545
self.config.settings.get("change_type_map") or self.cz.change_type_map
4646
)
4747
self.change_type_order = (
48-
self.config.settings.get("change_type_order") or self.cz.change_type_order
48+
self.config.settings.get("change_type_order")
49+
or self.cz.change_type_order
50+
or defaults.change_type_order
4951
)
5052
self.rev_range = args.get("rev_range")
5153
self.tag_format = args.get("tag_format") or self.config.settings.get(

tests/commands/test_changelog_command/test_changelog_incremental_with_release_candidate_version_alpha_.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
## 0.2.0a0 (2021-06-11)
1818

19-
### Fix
20-
21-
- output glitch
22-
2319
### Feat
2420

2521
- add new output
2622

23+
### Fix
24+
25+
- output glitch
26+
2727
## [1.0.0] - 2017-06-20
2828
### Added
2929
- New visual identity by [@tylerfortune8](https://github.com/tylerfortune8).

tests/commands/test_changelog_command/test_changelog_incremental_with_release_candidate_version_beta_.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
## 0.2.0b0 (2021-06-11)
1818

19-
### Fix
20-
21-
- output glitch
22-
2319
### Feat
2420

2521
- add new output
2622

23+
### Fix
24+
25+
- output glitch
26+
2727
## [1.0.0] - 2017-06-20
2828
### Added
2929
- New visual identity by [@tylerfortune8](https://github.com/tylerfortune8).

tests/commands/test_changelog_command/test_changelog_incremental_with_release_candidate_version_rc_.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
## 0.2.0rc0 (2021-06-11)
1818

19-
### Fix
20-
21-
- output glitch
22-
2319
### Feat
2420

2521
- add new output
2622

23+
### Fix
24+
25+
- output glitch
26+
2727
## [1.0.0] - 2017-06-20
2828
### Added
2929
- New visual identity by [@tylerfortune8](https://github.com/tylerfortune8).

0 commit comments

Comments
 (0)