Include PR/Issue links in the changelog (#1630)

This commit is contained in:
Joao Grassi 2024-12-03 10:38:34 +01:00 committed by GitHub
parent 123dd93489
commit 2d34907ac6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 75 additions and 0 deletions

72
.chloggen/CHANGELOG.tmpl Normal file
View File

@ -0,0 +1,72 @@
{{/*
Based on the default template:
https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/v0.15.0/chloggen/internal/chlog/summary.tmpl
*/}}
{{- define "entry" -}}
- `{{ .Component }}`: {{ .Note }} (
{{- range $i, $issue := .Issues }}
{{- if $i }}, {{ end -}}
[#{{ $issue }}](https://github.com/open-telemetry/semantic-conventions/issues/{{ $issue }})
{{- end -}}
)
{{- if .SubText }}
{{ .SubText | indent 2 }}
{{- end }}
{{- end }}
## {{ .Version }}
{{- if .BreakingChanges }}
### 🛑 Breaking changes 🛑
{{- range $i, $change := .BreakingChanges }}
{{- if eq $i 0}}
{{end}}
{{ template "entry" $change }}
{{- end }}
{{- end }}
{{- if .Deprecations }}
### 🚩 Deprecations 🚩
{{- range $i, $change := .Deprecations }}
{{- if eq $i 0}}
{{end}}
{{ template "entry" $change }}
{{- end }}
{{- end }}
{{- if .NewComponents }}
### 🚀 New components 🚀
{{- range $i, $change := .NewComponents }}
{{- if eq $i 0}}
{{end}}
{{ template "entry" $change }}
{{- end }}
{{- end }}
{{- if .Enhancements }}
### 💡 Enhancements 💡
{{- range $i, $change := .Enhancements }}
{{- if eq $i 0}}
{{end}}
{{ template "entry" $change }}
{{- end }}
{{- end }}
{{- if .BugFixes }}
### 🧰 Bug fixes 🧰
{{- range $i, $change := .BugFixes }}
{{- if eq $i 0}}
{{end}}
{{ template "entry" $change }}
{{- end }}
{{- end }}

View File

@ -22,3 +22,6 @@ change_logs:
# If 'change_logs' is specified in this file, and no value is specified for 'default_change_logs',
# then 'change_logs' MUST be specified in every entry file.
default_change_logs: [user]
# Custom template for the changelog that include links for the issue/PRs
summary_template: .chloggen/CHANGELOG.tmpl