You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog.md
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -124,10 +124,15 @@ Benefits:
124
124
cz changelog --incremental
125
125
```
126
126
127
-
## TODO
127
+
## Hooks
128
128
129
-
- [ ] support for hooks: this would allow introduction of custom information in the commiter, like a github or jira url. Eventually we could build a `CzConventionalGithub`, which would add links to commits
130
-
- [x] support for map: allow the usage of a `change_type` mapper, to convert from feat to feature for example.
129
+
Supported hook methods:
130
+
131
+
- per parsed message: useful to add links
132
+
- end of changelog generation: useful to send slack or chat message, or notify another department
133
+
134
+
Read more about hooks in the [customization page][customization]
|`commit_parser`|`str`| NO | Regex which should provide the variables explained in the [changelog description][changelog-des]|
143
-
|`changelog_pattern`|`str`| NO | Regex to validate the commits, this is useful to skip commits that don't meet your rulling standards like a Merge. Usually the same as bump_pattern |
144
-
|`change_type_map`|`dict`| NO | Convert the title of the change type that will appear in the changelog, if a value is not found, the original will be provided |
145
-
|`message_hook`|`method: (dict, git.GitCommit) -> dict`| NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. |
|`commit_parser`|`str`| NO | Regex which should provide the variables explained in the [changelog description][changelog-des]|
143
+
|`changelog_pattern`|`str`| NO | Regex to validate the commits, this is useful to skip commits that don't meet your rulling standards like a Merge. Usually the same as bump_pattern |
144
+
|`change_type_map`|`dict`| NO | Convert the title of the change type that will appear in the changelog, if a value is not found, the original will be provided |
145
+
|`message_hook`|`method: (dict, git.GitCommit) -> dict`| NO | Customize with extra information your message output, like adding links, this function is executed per parsed commit. |
146
+
|`changelog_hook`|`method: (full_changelog: str, partial_changelog: Optional[str]) -> str`| NO | Receives the whole and partial (if used incremental) changelog. Useful to send slack messages or notify a compliance department. Must return the full_changelog |
0 commit comments