-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): add Golang based changelog generator (#1)
--------- Co-authored-by: Datong Sun <[email protected]>
- Loading branch information
Showing
4 changed files
with
449 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- /* ===== entry template ==== */ -}} | ||
{{ define "entry" }} | ||
- {{ trim $.Message }} | ||
{{ range $i, $github := $.ParsedGithubs }} [{{ $github.Name }}]({{ $github.Link }}) {{- end }} | ||
{{ range $i, $jira := $.ParsedJiras }} [{{ $jira.ID }}]({{ $jira.Link }}) {{- end }} | ||
{{- end }} | ||
{{- /* ===== entry template ==== */ -}} | ||
{{- /* ==== section template ==== */ -}} | ||
{{- define "section" }} | ||
{{- if .scopes }} | ||
{{- $length := len .scopes }} | ||
{{- if gt $length 0 }} | ||
### {{ .sectionName }} | ||
{{- range $i, $scope := .scopes }} | ||
#### {{ $scope.ScopeName }} | ||
{{- range $j, $entry := $scope.Entries }} | ||
{{ template "entry" $entry }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- /* ==== section template ==== */ -}} | ||
|
||
## {{ .System }} | ||
|
||
{{ template "section" (dict "sectionName" "Performance" "scopes" .Type.performance) }} | ||
{{ template "section" (dict "sectionName" "Breaking Changes" "scopes" .Type.breaking_change ) }} | ||
{{ template "section" (dict "sectionName" "Deprecations" "scopes" .Type.deprecation ) }} | ||
{{ template "section" (dict "sectionName" "Dependencies" "scopes" .Type.dependency ) }} | ||
{{ template "section" (dict "sectionName" "Features" "scopes" .Type.feature ) }} | ||
{{ template "section" (dict "sectionName" "Fixes" "scopes" .Type.bugfix ) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module konghq.com/changelog | ||
|
||
go 1.20 | ||
|
||
require ( | ||
github.com/urfave/cli/v2 v2.25.7 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect | ||
) |
Oops, something went wrong.