diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md deleted file mode 100755 index 9d02fa2..0000000 --- a/.chglog/CHANGELOG.tpl.md +++ /dev/null @@ -1,47 +0,0 @@ -# Changelog - -Notable changes to Mailpit will be documented in this file. - -{{ if .Versions -}} -{{ if .Unreleased.CommitGroups -}} -## [Unreleased] - -{{ if .Unreleased.CommitGroups -}} -{{ range .Unreleased.CommitGroups -}} -### {{ .Title }} -{{ range .Commits -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} -{{ end }} -{{ end }} -{{ end -}} -{{ end -}} -{{ end -}} - -{{ range .Versions }} -{{- if .CommitGroups -}} -## [{{ .Tag.Name }}] - -{{ if .NoteGroups -}} -{{ range .NoteGroups -}} -### {{ .Title }} -{{ range .Notes }} -{{ .Body }} -{{ end -}} -{{ end }} -{{ end -}} -{{ end -}} - -{{ range .CommitGroups -}} -### {{ .Title }} -{{ range .Commits -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} -{{ end }} -{{ end }} - -{{- if .MergeCommits -}} -### Pull Requests -{{ range .MergeCommits -}} -- {{ .Header }} -{{ end }} -{{ end }} -{{ end -}} diff --git a/.chglog/RELEASE.tpl.md b/.chglog/RELEASE.tpl.md deleted file mode 100755 index a8ce8ae..0000000 --- a/.chglog/RELEASE.tpl.md +++ /dev/null @@ -1,12 +0,0 @@ -{{ if .Versions -}} -{{ range .Versions }} -{{- if .CommitGroups -}} -{{ range .CommitGroups -}} -### {{ .Title }} -{{ range .Commits -}} -- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} -{{ end }} -{{ end -}} -{{ end -}} -{{ end -}} -{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml deleted file mode 100755 index 0b5c0aa..0000000 --- a/.chglog/config.yml +++ /dev/null @@ -1,46 +0,0 @@ -style: github -template: CHANGELOG.tpl.md -info: - title: CHANGELOG - repository_url: https://github.com/axllent/mailpit -options: - commits: - # filters: - # Type: - # - feat - # - fix - # - perf - # - refactor - commit_groups: - title_maps: - feature: Feature - fix: Fix - # perf: Performance Improvements - # refactor: Code Refactoring - sort_by: Custom - title_order: - - Feature - - Chore - - UI - - API - - Libs - - Docker - - Security - - Fix - - Bugfix - - Docs - - Swagger - - Build - - Testing - - Test - - Tests - - Pull Requests - header: - pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" - pattern_maps: - - Type - - Scope - - Subject - notes: - keywords: - - BREAKING CHANGE diff --git a/.github/cliff.toml b/.github/cliff.toml new file mode 100644 index 0000000..1389f10 --- /dev/null +++ b/.github/cliff.toml @@ -0,0 +1,48 @@ +## https://git-cliff.org/ +[changelog] +body = """ +{% if version %}\ + \n## [{{ version }}] +{% else %}\ + \n## Unreleased +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }}\ + {% for commit in commits %} + - {{ commit.message | upper_first }}\ + {% endfor %} +{% endfor %}\n +""" +footer = "" +header = "# Changelog\n\nNotable changes to Mailpit will be documented in this file." +postprocessors = [ + {pattern = "reponse", replace = "response"}, + {pattern = "messsage", replace = "message"}, + {pattern = '(?i) go modules', replace = " Go dependencies"}, + {pattern = '(?i) node modules', replace = " node dependencies"}, + {pattern = '#([0-9]+)', replace = "[#$1](https://github.com/axllent/mailpit/issues/$1)"}, +] +trim = true + +[git] +# HTML comments added for grouping order, stripped on generation +commit_parsers = [ + {body = ".*security", group = "Security"}, + {message = "(?i)^feat", group = "Feature"}, + {message = "(?i)^chore", group = "Chore"}, + {message = "(?i)^libs", group = "Chore"}, + {message = "(?i)^ui", group = "Chore"}, + {message = "(?i)^api", group = "API"}, + {message = "(?i)^fix", group = "Fix"}, + {message = "(?i)^doc", group = "Documentation", default_scope = "unscoped"}, + {message = "(?i)^swagger", group = "Documentation", default_scope = "unscoped"}, + {message = "(?i)^test", group = "Test"}, +] + +# Exclude commits that are not matched by any commit parser. +# filter_commits = true +# Order releases topologically instead of chronologically. +# topo_order = true +# Order of commits in each group/release within the changelog. +# Allowed values: newest, oldest +sort_commits = "oldest"