Absolute PR link in Changelog #849
-
Is there an existing issue or pull request for this?
Feature descriptionWhen producing the changelog, we would like to produce an absolute link to the PR instead of just a #number. This ensures the PR is referenceable from other repos. The usecase is that we propagate changes to other repos, so by writing a relative #number in the release notes, the reference will be to that target repo's PRs, not the original one's - this is confusing and incorrect. Desired solutionAlternatives consideredAdditional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello 👋🏼 You can achieve this by using preprocessors/postprocessors: [changelog]
postprocessors = [
{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
]
[git]
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
] Also see the other template examples: https://git-cliff.org/docs/templating/examples Let me know if you need any further help :) |
Beta Was this translation helpful? Give feedback.
Hello 👋🏼
You can achieve this by using preprocessors/postprocessors:
Also see the other template examples: https://git-cliff.org/docs/templating/examples
Let me know if you need any further help :)