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 should generate links for PRs #1627

Closed
lmolkova opened this issue Nov 27, 2024 · 2 comments · Fixed by #1630
Closed

Chloggen should generate links for PRs #1627

lmolkova opened this issue Nov 27, 2024 · 2 comments · Fixed by #1630
Assignees
Labels
tooling Regarding build, workflows, build-tools, ...

Comments

@lmolkova
Copy link
Contributor

Changelog contains PR numbers which are not automatically recognized as links when they are committed to the repo.

- `database`: Add new `db.response.status_code` attribute, deprecate `db.cosmos.status_code`. (#1424)

It'd be great to make chloggen produce links for them.

@lmolkova lmolkova added help wanted Extra attention is needed tooling Regarding build, workflows, build-tools, ... labels Nov 27, 2024
@joaopgrassi joaopgrassi self-assigned this Nov 28, 2024
@joaopgrassi
Copy link
Member

joaopgrassi commented Nov 28, 2024

There could be a way of doing it today, with a custom template https://github.com/open-telemetry/opentelemetry-go-build-tools/blob/main/chloggen/internal/chlog/testdata/custom.tmpl#L5 the only problem is that it's not possible to distinguish between a issue or a PR, since the field today can hold numbers for both.

To really make it work, we would need in chloggen another field for the PR number.

I've sent a proposal, let's see 🤞. In the PR there's an example on how we can generate the PR links in the markdown file.

@joaopgrassi
Copy link
Member

joaopgrassi commented Nov 28, 2024

Alright, I was unaware that GitHub automatically redirects correctly PRs/Issues, so we don't need changes in the tool. Just a custom template.

Because pull requests are issues, issue and pull request numbers do not overlap in a repository. For example, if you open your first issue in a repository, the number will be 1. If you then open a pull request, the number will be 2

Source: https://docs.github.com/en/rest/using-the-rest-api/issue-event-types?apiVersion=2022-11-28

thanks @mowies !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Regarding build, workflows, build-tools, ...
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants