-
Notifications
You must be signed in to change notification settings - Fork 7
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
chore: Show new contributors in the changelog #893
Conversation
cliff.toml
Outdated
commit_preprocessors = [ | ||
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/CQCL/portgraph/issues/${2}))"}, # replace issue numbers | ||
] | ||
commit_preprocessors = [{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this trying to achieve? It looks like it's trying to delete things of the form "fixes #123"? The thing it's replacing looks more sensible, but pointing to the wrong repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to strip all the prefixes which show the PR number from the commit title.I removed the replacement part since the cliff+github writes that link reading the metadata, which seems more robust than the hardcoded link.
As for how we where generating correct links in the changelog even though here it linked to portgraph
, I'm not quite sure.
We don't call git-cliff
directly, but use release-plz
which does a lot of pre-processing and collects each relevant commit individually before generating the changelog delta programatically. It may be ignoring the commit_preprocessors
section since it's not using git-cliff
's CLI.
This config I submit here produces the correct result locally, but I'll have to review what gets generated by release-plz and submit a fix PR if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at our commit log, it seems that \(#([0-9])+\)
would do the job - we don't have any other text before the PR number
This reverts commit 25b1013.
Reverts #893 It seems git-cliff's github extension is not yet supported by release-plz >.< See this PR: https://www.github.com/MarcoIeni/release-plz/pull/1305 I'll reopen the PR once this release-plz is updated. This reverts commit 25b1013.
With the rename of the crate from `hugr_quantinuum` to `hugr` (#914) we broke `release-plz`' automatic changelog generation (since it cannot find the crate anymore), and all links to crate-related urls. This alpha release should fix those issues, in addition to letting us claim the new crate name. I added the partial changelog bits from #898, #893, and #840 since they won't be included in the new package's PRs. drive-by: Move CHANGELOG and README from the root to the `hugr` dir to be more consistent with other packages in the workspace, and symlink them instead.
Imports part of the github template from
git-cliff
, so the changelog mentions the new contributors to the repo.See https://git-cliff.org/docs/integration/github.
E.g.: