Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chloggen: allow specifiying PR number in the template #633

Closed
joaopgrassi opened this issue Nov 28, 2024 · 1 comment
Closed

chloggen: allow specifiying PR number in the template #633

joaopgrassi opened this issue Nov 28, 2024 · 1 comment

Comments

@joaopgrassi
Copy link
Member

Today, the template has a field for specifying an issue https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/main/chloggen/internal/chlog/entry.go#L41. In many repos using chloggen, the same field is also used for PR numbers (when there's no issue for example).

In the semconv repo, we want to generate links to the issue/PR numbers in the changelog to make it easier to navigate. Because the field issues today can hold both, I think it is not possible to generate the changelog the way we want. For example:

{{- define "entry" -}}
- `{{ .Component }}`: {{ .Note }} (
{{- range $i, $issue := .Issues }}
{{- if $i }}, {{ end -}}
[#{{ $issue }}](https://github.com/open-telemetry/semantic-conventions/issues/{{ $issue }})
{{- end -}}
)

So, it would be great if we could have another field pull_request in the template, so we could use it instead of the issue for semconv (as there it's almost always more interesting to see the actual changes in the changelog).

For context: open-telemetry/semantic-conventions#1627

@joaopgrassi joaopgrassi changed the title chloggen: allow specifiying PR number chloggen: allow specifiying PR number in the template Nov 28, 2024
@joaopgrassi
Copy link
Member Author

Alright, I was unaware that GitHub automatically redirects correctly PRs/Issues, so #633 redirects to this issue, same as as #634 redirects to the PR.

I guess then this is not needed as we can just use the issues field.

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants