8000 [CI] Improve git cliff config by rokatyy · Pull Request #3611 · nuclio/nuclio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[CI] Improve git cliff config #3611

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

Merged
merged 1 commit into from
Apr 24, 2025

Conversation

rokatyy
Copy link
Contributor
@rokatyy rokatyy commented Apr 23, 2025

This PR updates the Jinja2 changelog template to prevent duplicate PR references in the rendered output.

Previously, if a commit message already included a PR reference (e.g. (#1234)), the template would append another in #1234, resulting in duplicated links.

The grouping logic has also been updated. If the group is [CI] or [Test] and the commit message starts with a fix prefix, it will no longer be categorized under Bug Fixes. This helps ensure commits are grouped more accurately by their context rather than just their prefix.

Copy link
Contributor
@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
A couple of questions

Comment on lines +81 to +83
{ body = ".*security", group = "<!-- 9 -->🛡️ Security" },
{ message = "(?i)^\\[.*\\].*refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "(?i)^\\[.*\\].*fix", group = "<!-- 1 -->🐛 Bug Fixes" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So order matters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomerShor for groupping yes, the first match is put into group, other won't be considered.

Comment on lines +35 to +37
{% set first_line = commit.message | split(pat="\n") | first %}
{{ first_line }}{% if commit.github.username %} by @{{ commit.github.username }}{% endif %}
{% if commit.github.pr_number and ('#' ~ commit.github.pr_number) not in first_line %} in #{{ commit.github.pr_number }}{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you testing the jinja code locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomerShor I use gitcliff CLI

@TomerShor TomerShor merged commit dcc2c90 into nuclio:development Apr 24, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0