1"use strict";(self.webpackChunkgit_cliff_website=self.webpackChunkgit_cliff_website||[]).push([[8902],{2730:(e,i,n)=>{n.r(i),n.d(i,{assets:()=>c,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>t,toc:()=>h});var t=n(2104),r=n(4848),s=n(8453);const o={slug:"2.8.0",title:"What's new in 2.8.0?",date:new Date("2025-01-24T00:00:00.000Z"),authors:"orhun",tags:["release"]},l=void 0,c={authorsImageUrls:[void 0]},h=[{value:"What's new? \u26f0\ufe0f",id:"whats-new-\ufe0f",level:2},{value:"\ud83d\udd25 Improved Monorepo Support",id:"-improved-monorepo-support",level:3},{value:"\ud83d\udee1\ufe0f Native TLS Support",id:"\ufe0f-native-tls-support",level:3},{value:"\u2699\ufe0f Custom Config Name",id:"\ufe0f-custom-config-name",level:3},{value:"\ud83d\udea8 Better Errors",id:"-better-errors",level:3},{value:"\ud83d\udd04 Run with Callback API",id:"-run-with-callback-api",level:3},{value:"\ud83e\uddf0 Other",id:"-other",level:3},{value:"Contributions \ud83d\udc65",id:"contributions-",level:2},{value:"Support \ud83c\udf1f",id:"support-",level:2}];function a(e){const i={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("center",{children:(0,r.jsx)("a",{href:"https://github.com/orhun/git-cliff",children:(0,r.jsx)("img",{src:"/img/git-cliff-anim.gif"})})}),"\n",(0,r.jsxs)(i.blockquote,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff",children:(0,r.jsx)(i.strong,{children:"git-cliff"})})," is a command-line tool (written in ",(0,r.jsx)(i.a,{href:"https://www.rust-lang.org/",children:"Rust"}),") that provides a highly customizable way to generate changelogs from git history."]}),"\n",(0,r.jsxs)(i.p,{children:["It supports using ",(0,r.jsx)(i.a,{href:"/docs/configuration/git#commit_parsers",children:"custom regular expressions"})," to alter changelogs which are mostly based on ",(0,r.jsx)(i.a,{href:"/docs/configuration/git#conventional_commits",children:"conventional commits"}),". With a single ",(0,r.jsx)(i.a,{href:"/docs/configuration",children:"configuration file"}),", a wide variety of formats can be applied for a changelog, thanks to the Jinja2/Django-inspired ",(0,r.jsx)(i.a,{href:"/docs/category/templating",children:"template engine"}),"."]}),"\n",(0,r.jsxs)(i.p,{children:["More information and examples can be found in the ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff",children:"GitHub repository"}),"."]}),"\n"]}),"\n",(0,r.jsx)(i.h2,{id:"whats-new-\ufe0f",children:"What's new? \u26f0\ufe0f"}),"\n",(0,r.jsxs)(i.p,{children:["Happy new year! This version of ",(0,r.jsx)(i.strong,{children:"git-cliff"})," comes with quality of life improvements and bug fixes."]}),"\n",(0,r.jsxs)(i.p,{children:["The full changelog can be found ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/blob/main/CHANGELOG.md",children:"here"}),"."]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"-improved-monorepo-support",children:"\ud83d\udd25 Improved Monorepo Support"}),"\n",(0,r.jsx)(i.p,{children:"There were numerous improvements to the monorepo support in this release:"}),"\n",(0,r.jsxs)(i.ol,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.strong,{children:"git-cliff"})," now ",(0,r.jsx)(i.em,{children:"discovers"})," the Git repositories automatically even though when you run from sub directories."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:["The configuration file is now ",(0,r.jsx)(i.em,{children:"automatically found"})," when running from a sub directory."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:["The ",(0,r.jsx)(i.code,{children:"include-path"})," is now ",(0,r.jsx)(i.em,{children:"automatically set"})," to the current directory when running from a sub directory."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"As a result, the following command:"}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:'$ cd packages/some_library\n\n$ git cliff --include-path "packages/some_library/**/*" --repository "../../"\n'})}),"\n",(0,r.jsx)(i.p,{children:"becomes:"}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"$ cd packages/some_library\n\n$ git cliff # just works!\n"})}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"\ufe0f-native-tls-support",children:"\ud83d\udee1\ufe0f Native TLS Support"}),"\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.strong,{children:"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."]}),"\n",(0,r.jsx)(i.p,{children:"To enable it:"}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"$ git cliff --use-native-tls\n"})}),"\n",(0,r.jsxs)(i.p,{children:["Or configure it in your ",(0,r.jsx)(i.code,{children:"cliff.toml"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-toml",children:'[remote.gitlab]\nowner = "archlinux"\nrepo = "arch-repro-status"\napi_url = "https://gitlab.archlinux.org/api/v4"\nnative_tls = true\n'})}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"\ufe0f-custom-config-name",children:"\u2699\ufe0f Custom Config Name"}),"\n",(0,r.jsxs)(i.p,{children:["You can now specify a custom filename for the configuration while initializing ",(0,r.jsx)(i.strong,{children:"git-cliff"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"$ git-cliff --init --config custom.toml\n"})}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"-better-errors",children:"\ud83d\udea8 Better Errors"}),"\n",(0,r.jsx)(i.p,{children:"Before:"}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{children:"$ git cliff test\n ERROR git_cliff > Git error: `unable to parse OID - contains invalid characters; class=Invalid (3)`\n"})}),"\n",(0,r.jsx)(i.p,{children:"After:"}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{children:'$ git cliff test\n ERROR git_cliff > Failed to set the commit range: unable to parse OID - contains invalid characters; class=Invalid (3)\n"test" is not a valid commit range. Did you provide the correct arguments?\n'})}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"-run-with-callback-api",children:"\ud83d\udd04 Run with Callback API"}),"\n",(0,r.jsxs)(i.p,{children:["If you are using ",(0,r.jsx)(i.strong,{children:"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:"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-rust",children:'use clap::Parser;\nuse git_cliff::args::Opt;\nuse git_cliff_core::error::Result;\n\nfn main() -> Result<()> {\n let args = Opt::parse();\n\n git_cliff::run_with_changelog_modifier(args, |changelog| {\n println!("Releases: {:?}", changelog.releases);\n Ok(())\n })?;\n\n Ok(())\n}\n'})}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"-other",children:"\ud83e\uddf0 Other"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.em,{children:"(config)"})," Allow environment overwrites when using builtin config (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/issues/961",children:"#961"}),") - (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/commit/7ba3b55448bdbf7a4a475df2081b6d7c2e2ceb34",children:"7ba3b55"}),")"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.em,{children:"(remote)"})," Fix detection of GitLab merge request sha (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/issues/968",children:"#968"}),") - (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/commit/12976550d35bad8d535518010046bd136875736b",children:"1297655"}),")"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.em,{children:"(tips)"})," Extend the merge commit filter example (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/issues/963",children:"#963"}),") - (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/commit/09c0f905d8b20b585b0bc8183f14250d1a381ca0",children:"09c0f90"}),")"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.em,{children:"(build)"})," Bump MSRV to 1.83.0 - (",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/commit/37598c2d417a1646ec90590ab2a1f6d9da66296c",children:"37598
1c2"}),")"]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"contributions-",children:"Contributions \ud83d\udc65"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["@xsadia made their first contribution in ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pull/992",children:"#992"})]}),"\n",(0,r.jsxs)(i.li,{children:["@chenrui333 made their first contribution in ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pull/1002",children:"#1002"})]}),"\n",(0,r.jsxs)(i.li,{children:["@hackenbergstefan made their first contribution in ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pull/968",children:"#968"})]}),"\n",(0,r.jsxs)(i.li,{children:["@paul-uz made their first contribution in ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pull/963",children:"#963"})]}),"\n",(0,r.jsxs)(i.li,{children:["@jmartens made their first contribution in ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/pull/959",children:"#959"})]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Any contribution is highly appreciated! See the ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/blob/main/CONTRIBUTING.md",children:"contribution guidelines"})," for getting started."]}),"\n",(0,r.jsxs)(i.p,{children:["Feel free to ",(0,r.jsx)(i.a,{href:"https://github.com/orhun/git-cliff/issues/new/choose",children:"submit issues"})," and join our ",(0,r.jsx)(i.a,{href:"https://discord.gg/W3mAwMDWH4",children:"Discord"})," / ",(0,r.jsx)(i.a,{href:"https://matrix.to/#/#git-cliff:matrix.org",children:"Matrix"})," for discussion!"]}),"\n",(0,r.jsxs)(i.p,{children:["Follow ",(0,r.jsx)(i.code,{children:"git-cliff"})," on ",(0,r.jsx)(i.a,{href:"https://twitter.com/git_cliff",children:"Twitter"})," & ",(0,r.jsx)(i.a,{href:"https://fosstodon.org/@git_cliff",children:"Mastodon"})," to not miss any news!"]}),"\n",(0,r.jsx)(i.h2,{id:"support-",children:"Support \ud83c\udf1f"}),"\n",(0,r.jsxs)(i.p,{children:["If you liked ",(0,r.jsx)(i.code,{children:"git-cliff"})," and/or my other projects ",(0,r.jsx)(i.a,{href:"https://github.com/orhun",children:"on GitHub"}),", consider ",(0,r.jsx)(i.a,{href:"https://donate.orhun.dev",children:"donating"})," to support my open source endeavors."]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\ud83d\udc96 GitHub Sponsors: ",(0,r.jsx)(i.a,{href:"https://github.com/sponsors/orhun",children:"@orhun"})]}),"\n",(0,r.jsxs)(i.li,{children:["\u2615 Buy Me A Coffee: ",(0,r.jsx)(i.a,{href:"https://www.buymeacoffee.com/orhun",children:"https://www.buymeacoffee.com/orhun"})]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"Have a fantastic day! \u26f0\ufe0f"})]})}function d(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,r.jsx)(i,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,i,n)=>{n.d(i,{R:()=>o,x:()=>l});var t=n(6540);const r={},s=t.createContext(r);function o(e){const i=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:i},e.children)}},2104:e=>{e.exports=JSON.parse('{"permalink":"/blog/2.8.0","editUrl":"https://github.com/orhun/git-cliff/tree/main/website/blog/git-cliff-2.8.0.md","source":"@site/blog/git-cliff-2.8.0.md","title":"What\'s new in 2.8.0?","description":"git-cliff is a command-line tool (written in Rust) that provides a highly customizable way to generate changelogs from git history.","date":"2025-01-24T00:00:00.000Z","tags":[{"inline":true,"label":"release","permalink":"/blog/tags/release"}],"readingTime":3.56,"hasTruncateMarker":false,"authors":[{"name":"Orhun Parmaks\u0131z","title":"Author of git-cliff","url":"https://github.com/orhun","imageURL":"https://github.com/orhun.png","key":"orhun","page":null}],"frontMatter":{"slug":"2.8.0","title":"What\'s new in 2.8.0?","date":"2025-01-24T00:00:00.000Z","authors":"orhun","tags":["release"]},"unlisted":false,"prevItem":{"title":"What\'s new in 2.9.0?","permalink":"/blog/2.9.0"},"nextItem":{"title":"What\'s new in 2.7.0?","permalink":"/blog/2.7.0"}}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.