mirror of
https://github.com/orhun/git-cliff.git
synced 2024-12-15 18:44:21 +03:00
A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
changelogchangelog-generatorcommitconventional-changelogconventional-commitsgeneratorhacktoberfestkeepachangelogrustsemverstarred-orhun-repostarred-repo
9692ea7e31
200: fix(changelog): fix previous release references r=orhun a=tvcsantos <!--- Thank you for contributing to git-cliff! ⛰️ --> ## Description <!--- Describe your changes in detail --> Currently the previous pointer is not available under the unreleased group when running `git cliff`. Also when running `git cliff --unreleased` the preivous release is not correct and is pointing to the release before last, instead of the last tagged release. This PR deals with this by doing the following. For tackling the first problem we simply check if we produced more then one release at the end of the loop and add the missing pointers to the previous release. For solving the other problem we just adapt the `checked_sub` argument to take the difference into account and fix it on the unreleased scenario, when it must be `1` instead of `2`. ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Currently the previous pointer is not available under the unreleased group when running `git cliff`. Also when running `git cliff --unreleased` the preivous release is not correct and is pointing to the release before last, instead of the last tagged release. This PR deals with these problems. This is particularly useful for example on a Keep A Changelog format where we need the correct previous pointers so that we can add the proper link references. ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> I've added an extra fixture with a keep a changelog format example to test the scenario. ## Screenshots / Logs (if applicable) ## Types of Changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation (no code change) - [ ] Refactor (refactoring production code) - [ ] Other <!--- (provide information) --> ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [x] I have updated the documentation accordingly. - [x] I have formatted the code with [rustfmt](https://github.com/rust-lang/rustfmt). - [x] I checked the lints with [clippy](https://github.com/rust-lang/rust-clippy). - [x] I have added tests to cover my changes. - [x] All new and existing tests passed. Co-authored-by: Tiago Santos <tvcsantos@gmail.com> |
||
---|---|---|
.github | ||
config | ||
examples | ||
git-cliff | ||
git-cliff-core | ||
npm | ||
website | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
cliff.toml | ||
CNAME | ||
CODE_OF_CONDUCT.md | ||
codecov.yml | ||
CONTRIBUTING.md | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
RELEASE.md | ||
release.sh | ||
rust-toolchain.toml | ||
rustfmt.toml | ||
SECURITY.md |
Documentation | Website
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.
Documentation
Learn how to use git-cliff from the documentation.
In The Media
- git-cliff was featured in Console #141 - The Open Source Newsletter
Similar/Related Projects
- git-journal - The Git Commit Message and Changelog Generation Framework
- clog-cli - Generate beautiful changelogs from your Git commit history
- relnotes - A tool to automatically generate release notes for your project.
- cocogitto - A set of CLI tools for the conventional commit and semver specifications.
- cliff-jumper - A NodeJS CLI tool that combines git-cliff and conventional-recommended-bump to semantically bump a NodeJS package and generate a git-cliff powered changelog.
- release-plz - Release Rust packages from CI.
License
GNU General Public License (v3.0)
Copyright
Copyright © 2021-2023, git-cliff contributors