website/blog/git-cliff-2.7.0.md
git-cliff is a command-line tool (written in Rust) that provides a highly customizable way to generate changelogs from git history.
It supports using custom regular expressions to alter changelogs which are mostly based on conventional commits. With a single configuration file, a wide variety of formats can be applied for a changelog, thanks to the Jinja2/Django-inspired template engine.
More information and examples can be found in the GitHub repository.
The full changelog can be found here.
git-cliff now supports opening a repository that has been cloned using Jujutsu!
For example:
$ jj git clone --colocate https://github.com/orhun/git-cliff
$ cd git-cliff
$ git cliff # works!
:::caution
This works differently with colocated and non-colocated repositories. See the documentation for more information.
:::
:::tip
Watch my first live reaction to Jujutsu on this stream: Learning Jujutsu (a version control system)
:::
A bug causing some fields such as footer to be missing in the context JSON has been fixed.
This means that the following command now yields an identical result with git-cliff:
# hey look, a snake eating its own tail! 🐍
git cliff --context | git cliff --from-context
--context: prints the changelog context as JSON--from-context: generates a changelog from the context JSONThe context now contains the raw/unprocessed full commit message in the raw_message field. For example:
{
"version": "v0.1.0-rc.21",
"message": "The annotated tag message for the release",
"commits": [
{
"raw_message": "<type>[scope]: <description>\n[body]\n[footer(s)]"
}
]
}
You can use it like so:
{% for commit in commits %}
{{ commit.raw_message }}
{% endfor %}
In addition to the command-line/environment variables, you can now override the remote API URL in the configuration file as follows:
[remote.gitlab]
owner = "archlinux"
repo = "arch-repro-status"
api_url = "https://gitlab.archlinux.org/api/v4" # new!
This is useful when you have a self-hosted Git service and want to use the API for fetching metadata.
See the remote configuration for more information.
There was a bug causing the first time contributors to be removed from the changelog when there was a new release. This has been fixed and now the first time contributors are preserved in the changelog.
So if you run git cliff now, you might get new names in the changelog! Don't be surprised.
See this pull request for more details.
We brought back the Docker images for ARM64! 🎉 See them here.
docker run --platform linux/arm64 -t -v "$(pwd)":/app/ "orhunp/git-cliff:${TAG:-latest}"
There was a problem building these images due to the timeouts in the GitHub Actions workflow. This turned out to be a problem related to needlessly fetching the Rust toolchain in the build step of cargo-chef and is now fixed in this pull request.
See the related discussion here.
We now have a basic and reproducible dev environment using Nix along with CI checks for it!
Here is the Nix flake and you can use it by running nix build and nix run commands.
A small cosmetic change, but the output of git cliff --help is now colorful!
Try it for yourself :)
Do you like git-cliff? Spread the word on social media and let me know your thoughts! I will be featuring your testimonials.
I collected the testimonials that I could find so far and added them to the website. It picks one randomly on each page load.
Shoutout to those amazing people!
The remote integration with GitHub/GitLab/Gitea/Bitbucket has been stabilized and now works as expected (apart from a couple of bugs that come and go occasionally).
--latest is used with one tag (#901) - (508a97e)Any contribution is highly appreciated! See the contribution guidelines for getting started.
Feel free to submit issues and join our Discord / Matrix for discussion!
Follow git-cliff on Twitter & Mastodon to not miss any news!
If you liked git-cliff and/or my other projects on GitHub, consider donating to support my open source endeavors.
Have a fantastic day! ⛰️