Skip to content

Commit

Permalink
devops: Adding changelogs for the module
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhil Raj authored and Akhil Raj committed Nov 7, 2024
1 parent 71d2297 commit 036513c
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 31 deletions.
67 changes: 50 additions & 17 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
{{- if .Versions -}}
# Changelog
Repository: https://github.com/getjavelin/javelin-python
This file is automatically generated for every 'release' and contains all notable changes to the project.
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]

{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}

## [{{ .Tag.Name }}] - {{ datetime "2006-01-02 15:04:05 \n" .Tag.Date }}
{{- if .Tag.Previous -}}
[View Comparison] ({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }})
{{- end }}
{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}

{{- with .Commits -}}
{{- range . }}
- {{ .Subject }} ([{{ .Hash.Short }}])
{{- end }}
{{- end }}
{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}

{{- end }}
{{- end }}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}

{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ (index .Versions 0).Tag.Name }}...HEAD
{{- end }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
48 changes: 34 additions & 14 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
style: "angular"

# https://github.com/git-chglog/git-chglog
bin: git
style: "github"
template: "CHANGELOG.tpl.md"

info:
title: "Changelog"
repository_url: "https://github.com/getjavelin/javelin-python"

tag:
pattern: "^(v\\d+\\.\\d+\\.\\d+)$" # Example for 'v1.2.3'-style tags
options:
tag_filter_pattern: "^v"
sort: "semver"

commits:
filters:
Type:
- feat
- fix
- devops
sort_by: "Scope"

commit_groups:
title_maps:
feat: "Features"
fix: "Bug Fixes"
commit_groups:
group_by: "Type"
sort_by: "Title"
title_order:
- feat
- fix
- devops
title_maps:
feat: "Features"
fix: "Bug Fixes"
devops: "DevOps"

header:
pattern: "^(\\w*)(\\(.+\\))?: (.+)$"
pattern_maps:
- type
- scope
- subject
header:
pattern: "^(\\w*)(\\(.+\\))?: (.+)$"
pattern_maps:
- Type
- Scope
- Subject

notes:
keywords:
- BREAKING CHANGE

0 comments on commit 036513c

Please sign in to comment.