Skip to content

Commit

Permalink
Add changelog configuration and template
Browse files Browse the repository at this point in the history
Introduce configuration for conventional changelog generation with GitHub style. Also, add a template to structure the changelog entries, segregating changes, reverts, pull requests, and notes.
  • Loading branch information
Christian Roessner committed Sep 5, 2024
1 parent f962467 commit e2fc747
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{ range .Versions }}
## Changes

{{ range .CommitGroups -}}
### {{ .Title }}

{{ range .Commits -}}
* {{ .Subject }}
{{ end }}
{{ end -}}

{{- if .RevertCommits -}}
### Reverts

{{ range .RevertCommits -}}
* {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- if .MergeCommits -}}
### Pull Requests

{{ range .MergeCommits -}}
* {{ .Header }}
{{ end }}
{{ end -}}

{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}

{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
27 changes: 27 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/croessner/geoip-policyd
options:
commits:
filters:
Type:
- feat
- fix
- perf
- refactor
commit_groups:
# title_maps:
# feat: Features
# fix: Bug Fixes
# perf: Performance Improvements
# refactor: Code Refactoring
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE

0 comments on commit e2fc747

Please sign in to comment.