Skip to main content

What's new in 2.8.0? πŸ†•

Β· 3 min read
Orhun ParmaksΔ±z
Author of git-cliff

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.

What's new? ⛰️​

Happy new year! This version of git-cliff comes with quality of life improvements and bug fixes.

The full changelog can be found here.


πŸ”₯ Improved Monorepo Support​

There were numerous improvements to the monorepo support in this release:

  1. git-cliff now discovers the Git repositories automatically even though when you run from sub directories.

  2. The configuration file is now automatically found when running from a sub directory.

  3. The include-path is now automatically set to the current directory when running from a sub directory.

As a result, the following command:

$ cd packages/some_library

$ git cliff --include-path "packages/some_library/**/*" --repository "../../"

becomes:

$ cd packages/some_library

$ git cliff # just works!

πŸ›‘οΈ Native TLS Support​

git-cliff now supports enabling native TLS for remote requests. This is useful when you rely on a corporate trust root (e.g., for a mandatory proxy) that's included in your system's certificate store.

To enable it:

$ git cliff --use-native-tls

Or configure it in your cliff.toml:

[remote.gitlab]
owner = "archlinux"
repo = "arch-repro-status"
api_url = "https://gitlab.archlinux.org/api/v4"
native_tls = true

βš™οΈ Custom Config Name​

You can now specify a custom filename for the configuration while initializing git-cliff:

$ git-cliff --init --config custom.toml

🚨 Better Errors​

Before:

$ git cliff test
ERROR git_cliff > Git error: `unable to parse OID - contains invalid characters; class=Invalid (3)`

After:

$ git cliff test
ERROR git_cliff > Failed to set the commit range: unable to parse OID - contains invalid characters; class=Invalid (3)
"test" is not a valid commit range. Did you provide the correct arguments?

πŸ”„ Run with Callback API​

If you are using git-cliff in your Rust project as a library, you can now run it with a callback function to modify the changelog before it's printed:

use clap::Parser;
use git_cliff::args::Opt;
use git_cliff_core::error::Result;

fn main() -> Result<()> {
let args = Opt::parse();

git_cliff::run_with_changelog_modifier(args, |changelog| {
println!("Releases: {:?}", changelog.releases);
Ok(())
})?;

Ok(())
}

🧰 Other​

  • (config) Allow environment overwrites when using builtin config (#961) - (7ba3b55)
  • (remote) Fix detection of GitLab merge request sha (#968) - (1297655)
  • (tips) Extend the merge commit filter example (#963) - (09c0f90)
  • (build) Bump MSRV to 1.83.0 - (37598c2)

Contributions πŸ‘₯​

  • @xsadia made their first contribution in #992
  • @chenrui333 made their first contribution in #1002
  • @hackenbergstefan made their first contribution in #968
  • @paul-uz made their first contribution in #963
  • @jmartens made their first contribution in #959

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!

Support πŸŒŸβ€‹

If you liked git-cliff and/or my other projects on GitHub, consider donating to support my open source endeavors.

Have a fantastic day! ⛰️