From a3c8925356f48ebaf770e62644e7dbd5e8261ae6 Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:41:13 +0100 Subject: [PATCH 1/2] Include PR/Issue links in the changelog --- .chloggen/CHANGELOG.tmpl | 68 ++++++++++++++++++++++++++++++++++++++++ .chloggen/config.yaml | 3 ++ 2 files changed, 71 insertions(+) create mode 100644 .chloggen/CHANGELOG.tmpl diff --git a/.chloggen/CHANGELOG.tmpl b/.chloggen/CHANGELOG.tmpl new file mode 100644 index 0000000000..84729be735 --- /dev/null +++ b/.chloggen/CHANGELOG.tmpl @@ -0,0 +1,68 @@ +{{- 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 }} diff --git a/.chloggen/config.yaml b/.chloggen/config.yaml index 411f32d3a5..f600745253 100644 --- a/.chloggen/config.yaml +++ b/.chloggen/config.yaml @@ -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 From 41267bfb6b2edc6b4c122e22ebeb12ac3f5a3c6d Mon Sep 17 00:00:00 2001 From: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:23:27 +0100 Subject: [PATCH 2/2] Add link to the source of the template --- .chloggen/CHANGELOG.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.chloggen/CHANGELOG.tmpl b/.chloggen/CHANGELOG.tmpl index 84729be735..416959e205 100644 --- a/.chloggen/CHANGELOG.tmpl +++ b/.chloggen/CHANGELOG.tmpl @@ -1,3 +1,7 @@ +{{/* +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 }}