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

Add support for interpreting footers and turning them into links #41

Closed
bachp opened this issue Dec 17, 2021 · 0 comments
Closed

Add support for interpreting footers and turning them into links #41

bachp opened this issue Dec 17, 2021 · 0 comments
Assignees
Labels
feature/request New feature or request

Comments

@bachp
Copy link
Contributor

bachp commented Dec 17, 2021

Is your feature request related to a problem? Please describe.
We use conventinal commits and make use of footers to link to external systems.

It would be nice to have the possibility to proccess these footers and transform them into links.
These links can then be included in the changelog entry so that readers of the changelog can just click them
to get to the linked item.

Given the following example commit:

fix(db): use correct schema relation

Detailed decription...

Fixes: #123
Fixes: workitem 456
Refs: RFC1234

I would like to generate the following changelog entry:

Describe the solution you'd like
I think the most flexible way would be to have an additional custom tera filters available that can be applied to each footer value during template processing.

 {% for footer in footers %}
         {{ footer | into_links }}
 {% endfor %}

The behaviour of into links would be configured in the config file as a series of replace patterns.

Describe alternatives you've considered
The following are alternatives I have tought off:

  • A regex_replace in tera, as proposed in How to regex replace strings? #14, could most probably solve the issue.
  • Do a prost processing on the resulting changelog file and replace the URLs there.
  • The possibility to define custom filters in the config would also work, but this would need som form os scripting language support.
@bachp bachp added the feature/request New feature or request label Dec 17, 2021
bachp added a commit to bachp/git-cliff that referenced this issue Dec 17, 2021
bachp added a commit to bachp/git-cliff that referenced this issue Dec 18, 2021
Searches for patterns in commite messages and allows to convert them into
links via regular expression replacement.

This allows to include links to issue trackers and other tools in the resulting
changelog.

Closes orhun#41
@orhun orhun changed the title Add supporte for interpreting footers and turning them into links Add support for interpreting footers and turning them into links Dec 31, 2021
@orhun orhun closed this as completed in b88e7d3 Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants