-
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(changelog-tool): add changelog command line tool
- Loading branch information
Showing
5 changed files
with
455 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,9 @@ | ||
test: | ||
rm -rf kong | ||
git clone https://github.com/Kong/kong.git | ||
rm -f 1.0.0.md | ||
echo "# 1.0.0" > 1.0.0.md | ||
# use CHANGELOG/unreleased/kong to generate Kong system changelog | ||
go build && ./changelog generate --repo Kong/kong --repo_path kong --changelog_path CHANGELOG/unreleased/kong --system Kong >> 1.0.0.md | ||
# use CHANGELOG/unreleased/kong to generate Kong-enterprise system changelog | ||
go build && ./changelog generate --repo Kong/kong --repo_path kong --changelog_path CHANGELOG/unreleased/kong --system Kong-enterprise >> 1.0.0.md |
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,28 @@ | ||
{{- /* ===== entry template ==== */ -}} | ||
{{ define "entry" }} | ||
- {{ $.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.