-
Notifications
You must be signed in to change notification settings - Fork 586
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 git cliff toml to support generation of changelog #2697
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
670d534
feat: adding git cliff toml
chatton d8cafd4
chore: using docker image to generate changelog
chatton 4b53323
Merge branch 'main' into git-cliff-2106
chatton 16ee689
chore: adding usage information in cliff.toml
chatton 6706aed
Merge branch 'main' into git-cliff-2106
chatton 3b6c79d
Merge branch 'main' into git-cliff-2106
chatton 87c12dd
Merge branch 'main' into git-cliff-2106
chatton a875571
Merge branch 'main' into git-cliff-2106
chatton 1813f59
Merge branch 'main' into git-cliff-2106
chatton 4569ff0
chore: implemnted regex change suggestions
chatton aabaed7
chore: updating CONTRIBUTING.md with details about commit messages
chatton 8490b30
Merge branch 'main' into git-cliff-2106
chatton 2353229
Update CONTRIBUTING.md
chatton 140d251
Merge branch 'main' into git-cliff-2106
chatton d90488e
chore: addressing PR feedback and updating pull request template
chatton 13403c9
Merge branch 'main' into git-cliff-2106
chatton 0c028ac
Merge branch 'main' into git-cliff-2106
chatton 3ba101c
chore: adding support for processing each individual line of the comm…
chatton 0a30c21
Merge branch 'main' into git-cliff-2106
chatton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
feat: adding git cliff toml
- Loading branch information
commit 670d534dfaff6307c46c62900270824a37cdb6bb
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# configuration file for git-cliff (0.1.0) | ||
|
||
[changelog] | ||
# changelog header | ||
header = """ | ||
# Changelog\n | ||
All notable changes to this project will be documented in this file.\n | ||
""" | ||
# template for the changelog body | ||
# https://tera.netlify.app/docs/#introduction | ||
body = """ | ||
{% if version %}\ | ||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
{% else %}\ | ||
## [unreleased] | ||
{% endif %}\ | ||
{% for group, commits in commits | group_by(attribute="group") %} | ||
### {{ group | striptags | trim | upper_first }} | ||
{% for commit in commits %} | ||
* {{ commit.message | upper_first }}\ | ||
{% endfor %} | ||
{% endfor %}\n | ||
""" | ||
# remove the leading and trailing whitespace from the template | ||
trim = true | ||
# changelog footer | ||
footer = """ | ||
<!-- generated by git-cliff --> | ||
""" | ||
|
||
[git] | ||
# parse the commits based on https://www.conventionalcommits.org | ||
conventional_commits = true | ||
# filter out the commits that are not conventional | ||
filter_unconventional = true | ||
# process each line of a commit as an individual commit | ||
split_commits = false | ||
# regex for preprocessing the commit messages | ||
commit_preprocessors = [ | ||
# A reference to an issue is appened to commits that looks like "(#1234)", this will be replaced | ||
# with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/ibc-go/issues/1234)". | ||
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/cosmos/ibc-go/issues/${2}))" }, | ||
# any reference to a pr like "pr-1234" will be replaced with a link to the PR. | ||
{ pattern = '\(pr-([0-9]+)\)', replace = "([#${1}](https://github.com/cosmos/ibc-go/pulls/${1}))" }, | ||
] | ||
# regex for parsing and grouping commits | ||
commit_parsers = [ | ||
# specifying the number in a comment is a workaround to enable ordering of groups. | ||
# these comments are stripped out of the markdown with the filter "{{ group | striptags | trim | upper_first }}" | ||
# above in the body template. | ||
{ message = "^((?i)deps|(?i)dep|(?i)build)", group = "<!-- 0 -->Dependencies" }, | ||
{ message = "^((?i)api-breaking)", group = "<!-- 1 -->API Breaking" }, | ||
{ message = "^((?i)state-machine-breaking|(?i)smb)", group = "<!-- 2 -->State Machine Breaking" }, | ||
{ message = "^((?i)improvements|(?i)imp)", group = "<!-- 3 -->Improvements" }, | ||
{ message = "^((?i)feature|(?i)feat)", group = "<!-- 4 -->Features" }, | ||
{ message = "^((?i)fix|(?i)bug)", group = "<!-- 5 -->Bug Fixes" }, | ||
{ message = "^((?i)doc|(?i)docs|(?i)documentation)", group = "<!-- 6 -->Documentation" }, | ||
{ message = "^((?i)test|(?i)e2e)", group = "<!-- 7 -->Testing" }, | ||
{ message = "^((?i)chore|(?i)misc|(?i)nit)", group = "<!-- 8 -->Miscellaneous Tasks" }, | ||
] | ||
# filter out the commits that are not matched by commit parsers | ||
filter_commits = false | ||
# glob pattern for matching git tags | ||
tag_pattern = "v[0-9]*" | ||
# regex for skipping tags | ||
skip_tags = "" | ||
# regex for ignoring tags | ||
ignore_tags = "" | ||
# sort the tags chronologically | ||
date_order = false | ||
# sort the commits inside sections by oldest/newest order | ||
sort_commits = "oldest" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this effectively means I can write a commit message like
fix: fixed the problem in issue #1234 and also addressed concerns raised in pr-5678
And the issue and pr will be expanded into links in the changelog entry.
e.g.
Bug Fixes
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.
Awesome!
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.
Will the commit merged automatically be linked?
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.
@colin-axner yep the commit being merged will be linked. This is the issue number in parens at the end of the commit in the generated output.