Skip to content

Commit

Permalink
Added changelog setup
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlmartin committed Mar 9, 2022
1 parent 34738eb commit e28827c
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})

{{ 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/harness/harness-go-sdk
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:
- Subject
- Type
notes:
keywords:
- BREAKING CHANGE
11 changes: 11 additions & 0 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ module github.com/harness/harness-go-sdk/tools
go 1.16

require (
github.com/andygrunwald/go-jira v1.15.1 // indirect
github.com/git-chglog/git-chglog v0.15.1 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golangci/golangci-lint v1.44.2 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/kyokomi/emoji/v2 v2.2.9 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 // indirect
golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
gotest.tools/gotestsum v1.7.0 // indirect
)
Loading

0 comments on commit e28827c

Please sign in to comment.