├── .cliffignore ├── .dockerignore ├── .editorconfig ├── .envrc ├── .github ├── CODEOWNERS ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ ├── feature_request.yml │ └── integration.yml ├── PULL_REQUEST_TEMPLATE.md ├── actions │ └── run-fixtures-test │ │ └── action.yml ├── bors.toml ├── config.yml ├── dependabot.yml ├── fixtures │ ├── README.md │ ├── new-fixture-template │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-always-render-unreleased │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-always-render │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bitbucket-integration-custom-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bitbucket-integration │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-initial-tag-cli-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-initial-tag-default │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-initial-tag │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-unreleased-with-tag-message-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version-custom-minor │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version-keep-zerover │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version-major │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version-minor │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version-patch │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bump-version │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-bumped-version │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-cli-arg-ignore-tags │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-commit-footers │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-commit-preprocessors │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-commit-range-with-given-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-commit-range-with-sort-commits │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-commit-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-configure-from-cargo-toml │ │ ├── Cargo.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-conventional-commit │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-custom-remote-api-url │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-custom-scope │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-custom-tag-pattern │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-date-order │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-fixtures-locally.sh │ ├── test-footer-filter │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-footer-template │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-from-context-does-not-discard-fields │ │ ├── cliff.toml │ │ ├── commit.sh │ │ ├── context.json │ │ └── expected.md │ ├── test-from-context │ │ ├── cliff.toml │ │ ├── commit.sh │ │ ├── context.json │ │ └── expected.md │ ├── test-gitea-integration-custom-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-gitea-integration │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-github-integration-custom-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-github-integration │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-gitlab-integration-custom-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-gitlab-integration │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-header-template │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-ignore-tags │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-invert-ignore-tags │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-current-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-latest-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-no-tags │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-one-tag-bump-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-one-tag │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-tag-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links-unreleased-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-keep-a-changelog-links │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-latest-with-one-tag │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-limit-commits │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-monorepo-include-path │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-no-exec │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-regex-label-grouping │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-regex-replace-parser │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-remote-config │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-require-conventional-negative │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.rc │ ├── test-require-conventional-skipped │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-skip-breaking-changes │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-skip-commits │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-split-commits │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-submodules-include-path │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-submodules-range │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-submodules │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-tag-message │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-topo-order-arg │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-topo-order-commits │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ ├── test-topo-order │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md │ └── test-unchanged-tag-date │ │ ├── cliff.toml │ │ ├── commit.sh │ │ └── expected.md ├── mergify.yml └── workflows │ ├── cd.yml │ ├── check-semver.yml │ ├── ci.yml │ ├── docker.yml │ ├── test-fixtures.yml │ └── website.yml ├── .gitignore ├── .lycheeignore ├── .well-known └── funding-manifest-urls ├── CHANGELOG.md ├── CNAME ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md ├── RELEASE.md ├── SECURITY.md ├── cliff.toml ├── codecov.yml ├── config └── cliff.toml ├── examples ├── cocogitto.toml ├── detailed.toml ├── github-keepachangelog.toml ├── github.toml ├── keepachangelog.toml ├── minimal.toml ├── scoped.toml ├── scopesorted.toml └── unconventional.toml ├── flake.lock ├── flake.nix ├── git-cliff-core ├── Cargo.toml ├── src │ ├── changelog.rs │ ├── command.rs │ ├── commit.rs │ ├── config.rs │ ├── contributor.rs │ ├── embed.rs │ ├── error.rs │ ├── lib.rs │ ├── release.rs │ ├── remote │ │ ├── bitbucket.rs │ │ ├── gitea.rs │ │ ├── github.rs │ │ ├── gitlab.rs │ │ └── mod.rs │ ├── repo.rs │ ├── tag.rs │ └── template.rs └── tests │ └── integration_test.rs ├── git-cliff ├── Cargo.toml ├── examples │ └── run.rs └── src │ ├── args.rs │ ├── bin │ ├── completions.rs │ └── mangen.rs │ ├── lib.rs │ ├── logger.rs │ ├── main.rs │ └── profiler.rs ├── npm ├── git-cliff │ ├── .gitignore │ ├── .yarn │ │ └── releases │ │ │ └── yarn-4.1.0.cjs │ ├── .yarnrc.yml │ ├── eslint.config.js │ ├── package.json │ ├── src │ │ ├── cli.ts │ │ ├── getExePath.ts │ │ ├── index.ts │ │ ├── options.ts │ │ └── optionsToStringArgs.ts │ ├── tsconfig.json │ ├── tsup.config.ts │ └── yarn.lock └── package.json.tmpl ├── pypi ├── .gitignore └── pyproject.toml ├── release.sh ├── rust-toolchain.toml ├── rustfmt.toml ├── typos.toml └── website ├── .gitignore ├── README.md ├── babel.config.js ├── blog ├── authors.yml ├── git-cliff-0.5.0.md ├── git-cliff-1.2.0.md ├── git-cliff-1.3.0.md ├── git-cliff-1.4.0.md ├── git-cliff-2.0.0.md ├── git-cliff-2.2.0.md ├── git-cliff-2.3.0.md ├── git-cliff-2.4.0.md ├── git-cliff-2.5.0.md ├── git-cliff-2.6.0.md ├── git-cliff-2.7.0.md ├── git-cliff-2.8.0.md └── git-cliff-2.9.0.md ├── docs ├── configuration │ ├── bump.md │ ├── changelog.md │ ├── git.md │ ├── index.md │ └── remote.md ├── development │ ├── _category_.json │ ├── contributing.md │ └── profiling.md ├── docker.md ├── github-actions │ ├── _category_.json │ ├── git-cliff-action.md │ ├── setup-git-cliff.md │ └── taiki-e-install-action.md ├── gitlab.md ├── index.md ├── installation │ ├── alpine-linux.md │ ├── arch-linux.md │ ├── binary-releases.md │ ├── build-from-source.md │ ├── conda-forge.md │ ├── crates-io.md │ ├── homebrew.md │ ├── index.md │ ├── macports.md │ ├── nix.md │ ├── npm.md │ ├── pypi.md │ └── winget.md ├── integration │ ├── _category_.json │ ├── bitbucket.md │ ├── gitea.md │ ├── github.md │ ├── gitlab.md │ ├── python.md │ └── rust.md ├── sourcehut.md ├── templating │ ├── _category_.json │ ├── context.md │ ├── examples.md │ └── syntax.md ├── tips-and-tricks.md └── usage │ ├── _category_.json │ ├── adding-commits.md │ ├── adding-tag-messages.md │ ├── args.md │ ├── bump-version.md │ ├── examples.md │ ├── initializing.md │ ├── jujutsu.md │ ├── load-context.md │ ├── monorepos.md │ ├── multiple-repos.md │ ├── print-context.md │ ├── skipping-commits.md │ └── submodules.md ├── docusaurus.config.js ├── package-lock.json ├── package.json ├── sidebars.js ├── src ├── components │ ├── HomepageFeatures │ │ ├── index.tsx │ │ └── styles.module.css │ └── Testimonials │ │ ├── index.tsx │ │ └── styles.module.css ├── css │ └── custom.css └── pages │ ├── index.module.css │ └── index.tsx ├── static ├── .nojekyll ├── 10k │ └── index.html ├── favicon │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ └── site.webmanifest ├── fonts │ └── aAngkanyaSebelas.ttf ├── img │ ├── 10k-giveaway.jpg │ ├── git-cliff-anim.gif │ ├── git-cliff-banner.jpg │ ├── git-cliff-logo.png │ ├── git-cliff-social-card.jpg │ ├── git-cliff-star-history.png │ ├── git-cliff.png │ ├── logo.png │ ├── rustlab2023.png │ ├── tee-ash.jpg │ ├── tee-black.jpg │ ├── tee-dark-heather.jpg │ ├── tee-sport-grey.jpg │ └── tee-white.jpg └── issues │ └── index.html ├── tsconfig.json └── yarn.lock /.cliffignore: -------------------------------------------------------------------------------- 1 | # skip commits by their SHA1 2 | 3 | 4f88dda8c746173ea59f920b7579b7f6c74bd6c8 4 | 10c3194381f2cc4f93eb97404369568882ed8677 5 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # Directories 2 | /.git/ 3 | /.github/ 4 | /npm/ 5 | /pypi/ 6 | /website/ 7 | 8 | # Files 9 | .editorconfig 10 | .gitignore 11 | *.md 12 | codecov.yml 13 | Dockerfile 14 | LICENSE 15 | rustfmt.toml 16 | _config.yml 17 | .lycheeignore 18 | 19 | # Ignore rust toolchain files as they would needlessly fetch the toolchain. 20 | # But the image already contains a sufficient toolchain. 21 | # Ignore both the latest naming and the legacy naming 22 | rust-toolchain.toml 23 | rust-toolchain 24 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [{*.sh,*.rs}] 7 | indent_style = space 8 | indent_size = 4 9 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | dotenv_if_exists .env 3 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/about-codeowners/ 2 | # for more info about CODEOWNERS file 3 | 4 | # It uses the same pattern rule for gitignore file 5 | # https://git-scm.com/docs/gitignore#_pattern_format 6 | 7 | # Core 8 | * @orhun 9 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: orhun 2 | patreon: orhunp 3 | buy_me_a_coffee: orhun 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Discord Chat 3 | url: https://discord.gg/W3mAwMDWH4 4 | about: Ask questions and have discussions about git-cliff on Discord 5 | - name: Matrix Chat 6 | url: https://matrix.to/#/#git-cliff:matrix.org 7 | about: Ask questions and have discussions about git-cliff on Matrix 8 | -------------------------------------------------------------------------------- /.github/bors.toml: -------------------------------------------------------------------------------- 1 | status = [ 2 | "Check", 3 | "Lints", 4 | "Formatting", 5 | "Test suite", 6 | "Audit check", 7 | "Links", 8 | "Check Rust version", 9 | ] 10 | delete_merged_branches = true 11 | update_base_for_deletes = true 12 | cut_body_after = "
" 13 | commit_title = "chore(pull): merge ${PR_REFS}" 14 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for welcome - https://github.com/behaviorbot/welcome 2 | 3 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 4 | 5 | # Comment to be posted to on first time issues 6 | newIssueWelcomeComment: > 7 | Thanks for opening your first issue at **git-cliff**! Be sure to follow the issue template! ⛰️ 8 | 9 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 10 | 11 | # Comment to be posted to on PRs from first time contributors in your repository 12 | newPRWelcomeComment: > 13 | Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ 14 | 15 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 16 | 17 | # Comment to be posted to on pull requests merged by a first time user 18 | firstPRMergeComment: > 19 | Congrats on merging your first pull request! ⛰️ 20 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for Cargo 4 | - package-ecosystem: cargo 5 | directory: "/" 6 | schedule: 7 | interval: monthly 8 | open-pull-requests-limit: 10 9 | groups: 10 | minor: 11 | update-types: 12 | - "minor" 13 | patch: 14 | update-types: 15 | - "patch" 16 | 17 | # Maintain dependencies for GitHub Actions 18 | - package-ecosystem: github-actions 19 | directory: "/" 20 | schedule: 21 | interval: monthly 22 | open-pull-requests-limit: 10 23 | groups: 24 | minor: 25 | update-types: 26 | - "minor" 27 | patch: 28 | update-types: 29 | - "patch" 30 | 31 | # Maintain dependencies for NPM 32 | - package-ecosystem: "npm" 33 | directory: "/website" 34 | schedule: 35 | interval: monthly 36 | open-pull-requests-limit: 10 37 | groups: 38 | minor: 39 | update-types: 40 | - "minor" 41 | patch: 42 | update-types: 43 | - "patch" 44 | -------------------------------------------------------------------------------- /.github/fixtures/README.md: -------------------------------------------------------------------------------- 1 | # Fixtures 2 | 3 | [Test fixtures](https://en.wikipedia.org/wiki/Test_fixture) are a way of testing the `git-cliff`'s functionality against a configuration file (`cliff.toml`) and asserting the output (`expected.md`). 4 | 5 | They are being [run](https://github.com/orhun/git-cliff/actions/workflows/test-fixtures.yml) as a part of the GitHub Actions and the workflow file can be viewed [here](../workflows/test-fixtures.yml). 6 | 7 | ## Adding new fixtures 8 | 9 | 1. Copy the `new-fixture-template` as `test-`. 10 | 2. Update the files accordingly to the function that is being tested. 11 | 3. Run the fixture locally. (see below) 12 | 4. Add the fixture to [`test-fixtures.yml`](../workflows/test-fixtures.yml) matrix. 13 | - If you need to specify custom arguments to `git-cliff` for the fixture test, you can do it here with using `command`. 14 | 5. Commit your changes. 15 | 16 | See [this commit](https://github.com/orhun/git-cliff/commit/c94cb6a37ae268953ab29dd35cb43b6a4fec47cc) as an example. 17 | 18 | ## Running locally 19 | 20 | To run the fixtures locally: 21 | 22 | ```sh 23 | ./test-fixtures-locally.sh 24 | ``` 25 | 26 | ## See also 27 | 28 | - [Contribution Guidelines](https://github.com/orhun/git-cliff/blob/main/CONTRIBUTING.md) 29 | -------------------------------------------------------------------------------- /.github/fixtures/new-fixture-template/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "Features", default_scope = "app" }, 27 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 28 | ] 29 | -------------------------------------------------------------------------------- /.github/fixtures/new-fixture-template/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/new-fixture-template/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render-unreleased/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %} 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %} 8 | ## [unreleased] 9 | {% endif %} 10 | 11 | {% if commits | length == 0 -%} 12 | No significant changes. 13 | 14 | {% else -%} 15 | {% for group, commits in commits | group_by(attribute="group") -%} 16 | ### {{ group | upper_first }} 17 | etc. 18 | {% endfor %} 19 | {%- endif %} 20 | """ 21 | 22 | # render body even when there are no releases to process 23 | render_always = true 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render-unreleased/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render-unreleased/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | 6 | ## [unreleased] 7 | 8 | 9 | No significant changes. 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %} 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %} 8 | ## [unreleased] 9 | {% endif %} 10 | 11 | {% if commits | length == 0 -%} 12 | No significant changes. 13 | 14 | {% else -%} 15 | {% for group, commits in commits | group_by(attribute="group") -%} 16 | ### {{ group | upper_first }} 17 | etc. 18 | {% endfor %} 19 | {%- endif %} 20 | """ 21 | # render body even when there are no releases to process 22 | render_always = true 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | -------------------------------------------------------------------------------- /.github/fixtures/test-always-render/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | 6 | ## [0.2.0] - <> 7 | 8 | 9 | No significant changes. 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-bitbucket-integration-custom-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://bitbucket.org/mcwarman-playground/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-bitbucket-integration-custom-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed in v1.0.1 6 | * refactor(parser): expose string functions by @orhun 7 | * chore(release): add release script by @orhun 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bitbucket-integration/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://bitbucket.org/mcwarman-playground/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-bitbucket-integration/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * feat(config): support multiple file formats by @orhun 7 | * feat(cache): use cache while fetching pages by @orhun 8 | * feat(ci): add pipeline config by @mcwarman <7236500+mcwarman@users.noreply.github.com> in [#1](https://bitbucket.org/mcwarman-playground/git-cliff-readme-example/pull-requests/1) 9 | 10 | ## What's Changed in v1.0.1 11 | * refactor(parser): expose string functions by @orhun 12 | * chore(release): add release script by @orhun 13 | 14 | ## What's Changed in v1.0.0 15 | * Initial commit by @orhun 16 | * docs(project): add README.md by @orhun 17 | * feat(parser): add ability to parse arrays by @orhun 18 | * fix(args): rename help argument due to conflict by @orhun 19 | * docs(example)!: add tested usage example by @orhun 20 | 21 | ### New Contributors 22 | * @orhun made their first contribution 23 | 24 | 25 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-cli-arg/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "Features", default_scope = "app" }, 27 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 28 | ] 29 | 30 | [bump] 31 | initial_tag = "test" 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-cli-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 5 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-cli-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [2.1.1] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-default/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "Features", default_scope = "app" }, 27 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 28 | ] 29 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-default/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 5 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag-default/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "Features", default_scope = "app" }, 27 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 28 | ] 29 | 30 | [bump] 31 | initial_tag = "1.15.5" 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 5 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-initial-tag/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [1.15.5] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-unreleased-with-tag-message-arg/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] 7 | {% if message %} 8 | {{ message }} 9 | {% endif %}\ 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # regex for parsing and grouping commits 23 | commit_parsers = [ 24 | { message = "^feat", group = "Features", default_scope = "app" }, 25 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 26 | ] 27 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-unreleased-with-tag-message-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-unreleased-with-tag-message-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.1] 6 | 7 | Some text 8 | 9 | ### Test 10 | 11 | - Add tests 12 | 13 | 14 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-custom-minor/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [bump] 19 | features_always_bump_minor = true 20 | breaking_always_bump_major = true 21 | custom_minor_increment_regex = "minor|more" 22 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-custom-minor/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "minor: add minor" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-custom-minor/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] 6 | 7 | ### 🐛 Bug Fixes 8 | 9 | - Fix feature 2 10 | 11 | ### 💼 Other 12 | 13 | - Add minor 14 | 15 | ## [0.1.0] 16 | 17 | ### 🚀 Features 18 | 19 | - Add feature 1 20 | - Add feature 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-keep-zerover/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [bump] 22 | features_always_bump_minor = false 23 | breaking_always_bump_major = false 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-keep-zerover/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat!: add breaking feature" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-keep-zerover/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] 6 | 7 | ### Feat 8 | 9 | - [**breaking**] Add breaking feature 10 | 11 | ### Fix 12 | 13 | - Fix feature 2 14 | 15 | ## [0.1.0] 16 | 17 | ### Feat 18 | 19 | - Add feature 1 20 | - Add feature 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-major/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-major/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 1" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-major/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [1.0.0] 6 | 7 | ### 🐛 Bug Fixes 8 | 9 | - Fix feature 1 10 | - Fix feature 2 11 | 12 | ## [0.1.0] 13 | 14 | ### 🚀 Features 15 | 16 | - Add feature 1 17 | - Add feature 2 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-minor/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-minor/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat!: add breaking feature" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-minor/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] 6 | 7 | ### 🚀 Features 8 | 9 | - [**breaking**] Add breaking feature 10 | 11 | ### 🐛 Bug Fixes 12 | 13 | - Fix feature 2 14 | 15 | ## [0.1.0] 16 | 17 | ### 🚀 Features 18 | 19 | - Add feature 1 20 | - Add feature 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-patch/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-patch/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat!: add breaking feature" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version-patch/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.1] 6 | 7 | ### 🚀 Features 8 | 9 | - [**breaking**] Add breaking feature 10 | 11 | ### 🐛 Bug Fixes 12 | 13 | - Fix feature 2 14 | 15 | ## [0.1.0] 16 | 17 | ### 🚀 Features 18 | 19 | - Add feature 1 20 | - Add feature 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat!: add breaking feature" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bump-version/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [1.0.0] 6 | 7 | ### 🚀 Features 8 | 9 | - [**breaking**] Add breaking feature 10 | 11 | ### 🐛 Bug Fixes 12 | 13 | - Fix feature 2 14 | 15 | ## [0.1.0] 16 | 17 | ### 🚀 Features 18 | 19 | - Add feature 1 20 | - Add feature 2 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-bumped-version/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-bumped-version/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 1" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-bumped-version/expected.md: -------------------------------------------------------------------------------- 1 | v0.1.1 2 | -------------------------------------------------------------------------------- /.github/fixtures/test-cli-arg-ignore-tags/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for skipping tags 20 | skip_tags = "" 21 | # regex for ignoring tags 22 | ignore_tags = "" 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-cli-arg-ignore-tags/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add first beta feature" 5 | git tag v1.0.0-beta.1 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add second beta feature" 8 | git tag v1.0.0-beta.2 9 | 10 | # WARNING: If we won't create this commit, 1.0.0 won't be created! 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "chore: why do i need a commit here?" 12 | git tag v1.0.0 13 | 14 | GIT_COMMITTER_DATE="2021-01-23 01:23:49" git commit --allow-empty -m "fix: simple fix" 15 | git tag v1.0.1 16 | -------------------------------------------------------------------------------- /.github/fixtures/test-cli-arg-ignore-tags/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [1.0.1] - 2021-01-23 6 | 7 | ### 🐛 Bug Fixes 8 | 9 | - Simple fix 10 | 11 | ## [1.0.0] - 2021-01-23 12 | 13 | ### 🚀 Features 14 | 15 | - Add first beta feature 16 | - Add second beta feature 17 | 18 | ### ⚙️ Miscellaneous Tasks 19 | 20 | - Why do i need a commit here? 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-footers/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% for footer in commit.footers -%} 18 | , {{ footer.token }}{{ footer.separator }}{{ footer.value }}\ 19 | {% endfor %}\ 20 | {% endfor %} 21 | {% endfor %}\n 22 | """ 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-footers/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" -m "footer: test" 5 | 6 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 2" -m "Signed-off-by: bot" 7 | git tag v0.1.0 8 | 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "fix: fix feature 1" -m "footer1: xyz" -m "footer2: abc" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-footers/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### 🐛 Bug Fixes 8 | 9 | - Fix feature 1, footer1:xyz, footer2:abc 10 | 11 | ## [0.1.0] - 2021-01-23 12 | 13 | ### 🚀 Features 14 | 15 | - Add feature 1, footer:test 16 | - Add feature 2, Signed-off-by:bot 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-preprocessors/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers to modify commit messages prior to further processing. 23 | commit_preprocessors = [ 24 | # Replace issue numbers with links to the issue. 25 | { pattern = '\(#([0-9]+)\)', replace = "([issue#${1}](https://github.com/orhun/git-cliff/issues/${1}))" }, 26 | # Trim multiple spaces. 27 | { pattern = " +", replace = " " }, 28 | ] 29 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-preprocessors/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1 (#1)" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "refactor: move classes" 8 | git tag v0.1.0 9 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-preprocessors/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 1 10 | 11 | ### 🐛 Bug Fixes 12 | 13 | - Fix feature 1 ([issue#1](https://github.com/orhun/git-cliff/issues/1)) 14 | 15 | ### 🚜 Refactor 16 | 17 | - Move classes 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-given-range/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %} 13 | {{ commit_range.from }}..{{ commit_range.to }} 14 | {% for group, commits in commits | group_by(attribute="group") %} 15 | ### {{ group | upper_first }} 16 | {% for commit in commits %} 17 | - {{ commit.message | upper_first }}\ 18 | {% endfor %} 19 | {% endfor %}\n 20 | """ 21 | 22 | [git] 23 | # An array of regex based parsers for extracting data from the commit message. 24 | # Assigns commits to groups. 25 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 26 | commit_parsers = [ 27 | { message = "^feat", group = "Features", default_scope = "app" }, 28 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 29 | ] 30 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-given-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-given-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | a140cef0405e0bcbfb5de44ff59e091527d91b38..a9d4050212a18f6b3bd76e2e41fbb9045d268b80 8 | 9 | ### Bug Fixes 10 | 11 | - Rename help argument due to conflict 12 | 13 | ### Features 14 | 15 | - Add ability to parse arrays 16 | - Support multiple file formats 17 | 18 | ### Chore 19 | 20 | - Add release script 21 | 22 | ### Docs 23 | 24 | - Add tested usage example 25 | 26 | ### Refactor 27 | 28 | - Expose string functions 29 | 30 | 31 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-sort-commits/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %} 13 | {{ commit_range.from }}..{{ commit_range.to }} 14 | {% for group, commits in commits | group_by(attribute="group") %} 15 | ### {{ group | upper_first }} 16 | {% for commit in commits %} 17 | - {{ commit.message | upper_first }}\ 18 | {% endfor %} 19 | {% endfor %}\n 20 | """ 21 | 22 | [git] 23 | # An array of regex based parsers for extracting data from the commit message. 24 | # Assigns commits to groups. 25 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 26 | commit_parsers = [ 27 | { message = "^feat", group = "Features", default_scope = "app" }, 28 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 29 | ] 30 | sort_commits = "newest" 31 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-sort-commits/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range-with-sort-commits/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | a9d4050212a18f6b3bd76e2e41fbb9045d268b80..df6aef41292f3ffe5887754232e6ea7831c50ba5 8 | 9 | ### Features 10 | 11 | - Use cache while fetching pages 12 | - Support multiple file formats 13 | 14 | ## [1.0.1] - 2021-07-18 15 | 16 | e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715..06412ac1dd4071006c465dde6597a21d4367a158 17 | 18 | ### Chore 19 | 20 | - Add release script 21 | 22 | ### Refactor 23 | 24 | - Expose string functions 25 | 26 | ## [1.0.0] - 2021-07-18 27 | 28 | a78bc368e9ee382a3016c0c4bab41f7de4503bcd..ad27b43e8032671afb4809a1a3ecf12f45c60e0e 29 | 30 | ### Bug Fixes 31 | 32 | - Rename help argument due to conflict 33 | 34 | ### Features 35 | 36 | - Add ability to parse arrays 37 | 38 | ### Docs 39 | 40 | - Add tested usage example 41 | - Add README.md 42 | 43 | 44 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %} 13 | {{ commit_range.from }}..{{ commit_range.to }} 14 | {% for group, commits in commits | group_by(attribute="group") %} 15 | ### {{ group | upper_first }} 16 | {% for commit in commits %} 17 | - {{ commit.message | upper_first }}\ 18 | {% endfor %} 19 | {% endfor %}\n 20 | """ 21 | 22 | [git] 23 | # An array of regex based parsers for extracting data from the commit message. 24 | # Assigns commits to groups. 25 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 26 | commit_parsers = [ 27 | { message = "^feat", group = "Features", default_scope = "app" }, 28 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 29 | ] 30 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-commit-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | a9d4050212a18f6b3bd76e2e41fbb9045d268b80..df6aef41292f3ffe5887754232e6ea7831c50ba5 8 | 9 | ### Features 10 | 11 | - Support multiple file formats 12 | - Use cache while fetching pages 13 | 14 | ## [1.0.1] - 2021-07-18 15 | 16 | e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715..06412ac1dd4071006c465dde6597a21d4367a158 17 | 18 | ### Chore 19 | 20 | - Add release script 21 | 22 | ### Refactor 23 | 24 | - Expose string functions 25 | 26 | ## [1.0.0] - 2021-07-18 27 | 28 | a78bc368e9ee382a3016c0c4bab41f7de4503bcd..ad27b43e8032671afb4809a1a3ecf12f45c60e0e 29 | 30 | ### Bug Fixes 31 | 32 | - Rename help argument due to conflict 33 | 34 | ### Features 35 | 36 | - Add ability to parse arrays 37 | 38 | ### Docs 39 | 40 | - Add README.md 41 | - Add tested usage example 42 | 43 | 44 | -------------------------------------------------------------------------------- /.github/fixtures/test-configure-from-cargo-toml/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-configure-from-cargo-toml/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-conventional-commit/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # A Tera template to be rendered as the changelog's header. 3 | # See https://keats.github.io/tera/docs/#introduction 4 | header = """ 5 | # Changelog\n 6 | All notable changes to this project will be documented in this file. 7 | """ 8 | # A Tera template to be rendered for each release in the changelog. 9 | # See https://keats.github.io/tera/docs/#introduction 10 | body = """ 11 | {% for group, commits in commits | group_by(attribute="group") %} 12 | ## {{ group | striptags | trim | upper_first }} 13 | {% for commit in commits %} 14 | {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ 15 | {% if commit.breaking %}[**breaking**]: {{ commit.breaking_description }}{% endif %} 16 | {{ commit.message }}: {{ commit.body }}\ 17 | {% for footer in commit.footers %} 18 | - {{ footer.token }}{{ footer.separator }} {{ footer.value }}\ 19 | {% endfor %} 20 | {% endfor %}\ 21 | {% endfor %}\n 22 | """ 23 | 24 | [git] 25 | # An array of regex based parsers for extracting data from the commit message. 26 | # Assigns commits to groups. 27 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 28 | commit_parsers = [ 29 | { message = "^feat", group = "Features", default_scope = "app" }, 30 | { message = "^fix" }, 31 | ] 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-conventional-commit/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m \ 6 | "feat(web): feature 1, breaking change in footer 7 | 8 | Body feature 1 9 | 10 | BREAKING CHANGE: breaking change description feature 1 11 | Signed-off-by: user1 12 | Reviewed-by: user2 13 | " 14 | 15 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m \ 16 | "feat(web)!: feature 2, breaking chain in description 17 | 18 | Body feature 2 19 | 20 | Signed-off-by: user3 21 | " 22 | 23 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m \ 24 | "feat!: feature 3, use default scope = app 25 | 26 | Body feature 2 27 | 28 | Signed-off-by: user3 29 | " 30 | 31 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m \ 32 | "fix(scope): fix 1, use scope as group 33 | 34 | Body fix 1 35 | 36 | Fix: #1 37 | " 38 | 39 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m \ 40 | "fix(front-end): fix 2, no footer 41 | 42 | Body fix 2 43 | " 44 | 45 | GIT_COMMITTER_DATE="2022-04-06 01:25:14" git commit --allow-empty -m \ 46 | "fix(front-end): fix 3 and 4, no body but footer 47 | 48 | Fix: #3 49 | Fix: #4 50 | " 51 | 52 | git tag v0.1.0 53 | -------------------------------------------------------------------------------- /.github/fixtures/test-conventional-commit/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## Features 6 | 7 | *(web)* [**breaking**]: breaking change description feature 1 8 | feature 1, breaking change in footer: Body feature 1 9 | - BREAKING CHANGE: breaking change description feature 1 10 | - Signed-off-by: user1 11 | - Reviewed-by: user2 12 | 13 | *(web)* [**breaking**]: feature 2, breaking chain in description 14 | feature 2, breaking chain in description: Body feature 2 15 | - Signed-off-by: user3 16 | 17 | *(app)* [**breaking**]: feature 3, use default scope = app 18 | feature 3, use default scope = app: Body feature 2 19 | - Signed-off-by: user3 20 | 21 | ## Fix 22 | 23 | *(scope)* 24 | fix 1, use scope as group: Body fix 1 25 | - Fix: #1 26 | 27 | *(front-end)* 28 | fix 2, no footer: Body fix 2 29 | 30 | *(front-end)* 31 | fix 3 and 4, no body but footer: 32 | - Fix: #3 33 | - Fix: #4 34 | 35 | 36 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-remote-api-url/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://gitlab.archlinux.org/archlinux/arch-repro-status 5 | git fetch 6 | git checkout 5fe2f324db566756ccaf066fe186100a09a87625 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-remote-api-url/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed in v1.4.1 6 | * Update the copyright year in license by @Orhun Parmaksız 7 | * bump dependencies by @Orhun Parmaksız 8 | * update cargo-deny config by @Orhun Parmaksız 9 | * prepare for 1.4.1 by @Orhun Parmaksız 10 | 11 | **Full Changelog**: https://gitlab.com/archlinux/arch-repro-status/compare/v1.4.0...v1.4.1 12 | 13 | 14 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-scope/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for group, commits in commits | group_by(attribute="scope") %} 16 | #### {{ group | upper_first }} 17 | {% for commit in commits %} 18 | - {{ commit.message | upper_first }}\ 19 | {% endfor %} 20 | {% endfor %}\ 21 | {% endfor %}\n 22 | """ 23 | 24 | [git] 25 | # An array of regex based parsers for extracting data from the commit message. 26 | # Assigns commits to groups. 27 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 28 | commit_parsers = [ 29 | { message = "^feat", group = "Features", default_scope = "app" }, 30 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 31 | ] 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-scope/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 9 | git tag v0.1.0 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-scope/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### Bug Fixes 8 | 9 | #### Cli 10 | 11 | - Fix feature 1 12 | - Fix feature 2 13 | 14 | ### Features 15 | 16 | #### App 17 | 18 | - Add feature 1 19 | 20 | #### Gui 21 | 22 | - Add feature 2 23 | 24 | 25 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-tag-pattern/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="alpha-") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "Features", default_scope = "app" }, 27 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 28 | ] 29 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-tag-pattern/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | git tag beta-0.1.0 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 8 | git tag alpha-0.1.0 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 10 | git tag beta-0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 12 | git tag alpha-0.2.0 13 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 14 | -------------------------------------------------------------------------------- /.github/fixtures/test-custom-tag-pattern/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-date-order/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-date-order/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | git checkout v0.1.0 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" 12 | git tag v0.1.1 13 | -------------------------------------------------------------------------------- /.github/fixtures/test-date-order/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.1] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Fix feature 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-fixtures-locally.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | SCRIPT_DIR=$(readlink -f "$(dirname "$0")") 5 | 6 | if [ -z "$1" ]; then 7 | echo "Please input a fixture name." 8 | exit 1 9 | fi 10 | 11 | export FIXTURES_DIR="$SCRIPT_DIR/$1" 12 | 13 | # Set up a temporary repository 14 | cd "$(mktemp -d)" 15 | git init >&2 16 | 17 | # Commit 18 | "$FIXTURES_DIR/commit.sh" 19 | 20 | # Check if we are running on Windows with MINGW64 and if cygpath is available 21 | if [ -n "$MSYSTEM" ] && [ "$MSYSTEM" = "MINGW64" ]; then 22 | echo "Running inside MINGW64 trying to convert paths to Windows format." 23 | if command -v cygpath > /dev/null 2>&1; then 24 | # Convert the path to Windows format 25 | SCRIPT_DIR=$(cygpath -w "$SCRIPT_DIR") 26 | FIXTURES_DIR=$(cygpath -w "$FIXTURES_DIR") 27 | else 28 | echo "WARNING: cygpath command not found in the PATH. The script may not work correctly on Windows." 29 | exit 1 30 | fi 31 | fi 32 | 33 | # Show results 34 | echo -e "\n---Run git-cliff---" >&2 35 | cargo run --manifest-path "$SCRIPT_DIR/../../Cargo.toml" -- -vv --config "$FIXTURES_DIR/cliff.toml" "${@:2}" 36 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-filter/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for parsing and grouping commits 20 | commit_parsers = [ 21 | { message = "^feat", group = "Features", default_scope = "app" }, 22 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 23 | # Accept both separators, ": " and ":". 24 | # Conventional commits require the separator to be ": ", but the reference implementation of the 25 | # conventional commits parser currently does not adhere to the specification. See also: 26 | # https://github.com/conventional-commits/parser/issues/47 27 | { footer = "^changelog: ?ignore", skip = true }, 28 | ] 29 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-filter/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 00:00:00" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 00:10:00" git commit --allow-empty -m "feat: add feature 1" 6 | git tag v0.1.0 7 | GIT_COMMITTER_DATE="2022-04-06 01:00:00" git commit --allow-empty -m "refactor: change feature 1" -m "BREAKING CHANGE: feature 1 is now different" 8 | GIT_COMMITTER_DATE="2022-04-06 01:10:00" git commit --allow-empty -m "chore: upgrade dependencies" -m "changelog: ignore" 9 | git tag v0.2.0 10 | GIT_COMMITTER_DATE="2022-04-06 02:00:00" git commit --allow-empty -m "test: add tests" -m "footer: some more info" 11 | GIT_COMMITTER_DATE="2022-04-06 02:10:00" git commit --allow-empty -m "test: add more tests" -m "changelog: ignore" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-filter/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Refactor 14 | 15 | - Change feature 1 16 | 17 | ## [0.1.0] - 2022-04-06 18 | 19 | ### Features 20 | 21 | - Add feature 1 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-template/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | # A Tera template to be rendered as the changelog's footer. 21 | # See https://keats.github.io/tera/docs/#introduction 22 | footer = """ 23 | {% for release in releases %}\ 24 | {% if release.version %}\ 25 | {% if release.previous.version %}\ 26 | 27 | {% endif %}\ 28 | {% else %}\ 29 | 30 | {% endif %}\ 31 | {% endfor %}\ 32 | """ 33 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-template/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 1" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | git tag v0.2.0 11 | 12 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: add footer" 13 | git tag v3.0.0 14 | 15 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "test: footer" 16 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "perf: footer" 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-footer-template/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### ⚡ Performance 8 | 9 | - Footer 10 | 11 | ### 🧪 Testing 12 | 13 | - Footer 14 | 15 | ## [3.0.0] 16 | 17 | ### 🚀 Features 18 | 19 | - Add footer 20 | 21 | ## [0.2.0] 22 | 23 | ### 🐛 Bug Fixes 24 | 25 | - Fix feature 1 26 | - Fix feature 2 27 | 28 | ## [0.1.0] 29 | 30 | ### 🚀 Features 31 | 32 | - Add feature 1 33 | - Add feature 2 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context-does-not-discard-fields/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog footer 3 | header = """ 4 | # Changelog\n 5 | All notable changes to this project will be documented in this file. 6 | """ 7 | # template for the changelog body 8 | # https://keats.github.io/tera/docs/#introduction 9 | body = """ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ## {{ group | striptags | trim | upper_first }} 12 | {% for commit in commits %} 13 | {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ 14 | {% if commit.breaking %}[**breaking**]: {{ commit.breaking_description }}{% endif %} 15 | {{ commit.message }}: {{ commit.body }}\ 16 | {% for footer in commit.footers %} 17 | - {{ footer.token }}{{ footer.separator }} {{ footer.value }}\ 18 | {% endfor %} 19 | {% endfor %}\ 20 | {% endfor %}\n 21 | """ 22 | 23 | [git] 24 | # An array of regex based parsers for extracting data from the commit message. 25 | # Assigns commits to groups. 26 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 27 | commit_parsers = [ 28 | { message = "^feat", group = "Features", default_scope = "app" }, 29 | { message = "^fix" }, 30 | ] 31 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context-does-not-discard-fields/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m \ 6 | "feat(web): feature 1, breaking change in footer 7 | 8 | Body feature 1 9 | 10 | BREAKING CHANGE: breaking change description feature 1 11 | Signed-off-by: user1 12 | Reviewed-by: user2 13 | " 14 | 15 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m \ 16 | "feat(web)!: feature 2, breaking chain in description 17 | 18 | Body feature 2 19 | 20 | Signed-off-by: user3 21 | " 22 | 23 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m \ 24 | "feat!: feature 3, use default scope = app 25 | 26 | Body feature 2 27 | 28 | Signed-off-by: user3 29 | " 30 | 31 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m \ 32 | "fix(scope): fix 1, use scope as group 33 | 34 | Body fix 1 35 | 36 | Fix: #1 37 | " 38 | 39 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m \ 40 | "fix(front-end): fix 2, no footer 41 | 42 | Body fix 2 43 | " 44 | 45 | GIT_COMMITTER_DATE="2022-04-06 01:25:14" git commit --allow-empty -m \ 46 | "fix(front-end): fix 3 and 4, no body but footer 47 | 48 | Fix: #3 49 | Fix: #4 50 | " 51 | 52 | git tag v0.1.0 53 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context-does-not-discard-fields/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## Features 6 | 7 | *(web)* [**breaking**]: breaking change description feature 1 8 | feature 1, breaking change in footer: Body feature 1 9 | - BREAKING CHANGE: breaking change description feature 1 10 | - Signed-off-by: user1 11 | - Reviewed-by: user2 12 | 13 | *(web)* [**breaking**]: feature 2, breaking chain in description 14 | feature 2, breaking chain in description: Body feature 2 15 | - Signed-off-by: user3 16 | 17 | *(app)* [**breaking**]: feature 3, use default scope = app 18 | feature 3, use default scope = app: Body feature 2 19 | - Signed-off-by: user3 20 | 21 | ## Fix 22 | 23 | *(scope)* 24 | fix 1, use scope as group: Body fix 1 25 | - Fix: #1 26 | 27 | *(front-end)* 28 | fix 2, no footer: Body fix 2 29 | 30 | *(front-end)* 31 | fix 3 and 4, no body but footer: 32 | - Fix: #3 33 | - Fix: #4 34 | 35 | 36 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}{% if extra.note %} - {{ extra.note }}{% endif %} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {{ commit.message | upper_first }}{% if commit.extra.note %} ({{ commit.extra.note }}){% endif %}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for parsing and grouping commits 20 | commit_parsers = [ 21 | { message = "^feat", group = "Features", default_scope = "app" }, 22 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 23 | ] 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2 SHOULD NOT BE IN THE CHANGELOG" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-from-context/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-05 - This is so awesome! 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 (that was a tough one) 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-05 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitea-integration-custom-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://codeberg.org/ThetaDev/git-cliff-readme-example.git 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitea-integration-custom-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * feat(config): support multiple file formats by @ThetaDev 7 | * feat(cache): use cache while fetching pages by @ThetaDev 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitea-integration/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://codeberg.org/ThetaDev/git-cliff-readme-example.git 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitea-integration/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * Initial commit by @ThetaDev 7 | * docs(project): add README.md by @ThetaDev 8 | * feat(parser): add ability to parse arrays by @ThetaDev 9 | * fix(args): rename help argument due to conflict by @ThetaDev 10 | * docs(example)!: add tested usage example by @ThetaDev 11 | * refactor(parser): expose string functions by @ThetaDev 12 | * chore(release): add release script by @ThetaDev 13 | * feat(config): support multiple file formats by @ThetaDev 14 | * feat(cache): use cache while fetching pages by @ThetaDev 15 | 16 | ### New Contributors 17 | * @ThetaDev made their first contribution 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-github-integration-custom-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-github-integration-custom-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed in v1.0.1 6 | * refactor(parser): expose string functions by @orhun 7 | * chore(release): add release script by @orhun 8 | 9 | **Full Changelog**: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0...v1.0.1 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-github-integration/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-github-integration/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * feat(config): support multiple file formats by @orhun 7 | * feat(cache): use cache while fetching pages by @orhun 8 | 9 | ## What's Changed in v1.0.1 10 | * refactor(parser): expose string functions by @orhun 11 | * chore(release): add release script by @orhun 12 | 13 | **Full Changelog**: https://github.com/orhun/git-cliff-readme-example/compare/v1.0.0...v1.0.1 14 | 15 | ## What's Changed in v1.0.0 16 | * Initial commit by @orhun 17 | * docs(project): add README.md by @orhun 18 | * feat(parser): add ability to parse arrays by @orhun 19 | * fix(args): rename help argument due to conflict by @orhun 20 | * docs(example)!: add tested usage example by @orhun 21 | 22 | ### New Contributors 23 | * @orhun made their first contribution 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitlab-integration-custom-range/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://gitlab.com/dark0dave/dotfiles 5 | git fetch 6 | git checkout 3c048a1b6a32e6d1076581225b06dd41ee5a02ff 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitlab-integration-custom-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * Added curl files by @dark0dave 7 | * Zsh update by @dark0dave 8 | * Update README.md by @dark0dave 9 | * Fix for path by @dark0dave 10 | * Update README.md by @dark0dave 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitlab-integration/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://gitlab.com/dark0dave/dotfiles 5 | git fetch 6 | git checkout 3c048a1b6a32e6d1076581225b06dd41ee5a02ff 7 | -------------------------------------------------------------------------------- /.github/fixtures/test-gitlab-integration/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## What's Changed 6 | * Initial commit by @dark0dave 7 | * Added tmux files by @dark0dave 8 | * Updated readme by @dark0dave 9 | * Updated readme and added zshrc files by @dark0dave 10 | * Added python files by @dark0dave 11 | * Added curl files by @dark0dave 12 | * Zsh update by @dark0dave 13 | * Update README.md by @dark0dave 14 | * Fix for path by @dark0dave 15 | * Update README.md by @dark0dave 16 | * Started setup files by @dark0dave 17 | * Updated tmux to be a little nicer by @dark0dave 18 | * Merge branch 'feature/tmux-improvements' into 'master' by @dark0dave in #2 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-header-template/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog footer 3 | header = """ 4 | # Changelog 5 | {% for release in releases %}\ 6 | {% if release.version %}\ 7 | {% if release.previous.version %}\ 8 | 9 | {% endif %}\ 10 | {% else %}\ 11 | 12 | {% endif %}\ 13 | {% endfor %}\ 14 | """ 15 | # template for the changelog body 16 | # https://keats.github.io/tera/docs/#introduction 17 | body = """ 18 | {% if version %}\ 19 | ## [{{ version | trim_start_matches(pat="v") }}] 20 | {% else %}\ 21 | ## [unreleased] 22 | {% endif %}\ 23 | {% for group, commits in commits | group_by(attribute="group") %} 24 | ### {{ group | upper_first }} 25 | {% for commit in commits %} 26 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 27 | {% endfor %} 28 | {% endfor %}\n 29 | """ 30 | -------------------------------------------------------------------------------- /.github/fixtures/test-header-template/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 2" 6 | git tag v0.1.0 7 | 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 1" 9 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "fix: fix feature 2" 10 | git tag v0.2.0 11 | 12 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: add footer" 13 | git tag v3.0.0 14 | 15 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "test: footer" 16 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "perf: footer" 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-header-template/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | 4 | 5 | ## [unreleased] 6 | 7 | ### Perf 8 | 9 | - Footer 10 | 11 | ### Test 12 | 13 | - Footer 14 | 15 | ## [3.0.0] 16 | 17 | ### Feat 18 | 19 | - Add footer 20 | 21 | ## [0.2.0] 22 | 23 | ### Fix 24 | 25 | - Fix feature 1 26 | - Fix feature 2 27 | 28 | ## [0.1.0] 29 | 30 | ### Feat 31 | 32 | - Add feature 1 33 | - Add feature 2 34 | -------------------------------------------------------------------------------- /.github/fixtures/test-ignore-tags/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # Regex to select git tags that do not represent proper releases. 23 | # Takes precedence over `tag_pattern`. 24 | # Changes belonging to these releases will be included in the next release. 25 | skip_tags = "v0.1.0-beta.1" 26 | # Regex to exclude git tags after applying the tag_pattern. 27 | ignore_tags = "v.*-beta.*" 28 | -------------------------------------------------------------------------------- /.github/fixtures/test-ignore-tags/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add skip feature" 5 | git tag v0.1.0-beta.1 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 1" 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" 9 | git tag v0.1.0 10 | 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:48" git commit --allow-empty -m "feat: add feature 2" 12 | git tag v0.2.0-beta.1 13 | 14 | GIT_COMMITTER_DATE="2021-01-23 01:23:49" git commit --allow-empty -m "feat: add feature 3" 15 | git tag v0.2.0 16 | -------------------------------------------------------------------------------- /.github/fixtures/test-ignore-tags/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 2 10 | - Add feature 3 11 | 12 | ## [0.1.0] - 2021-01-23 13 | 14 | ### 🚀 Features 15 | 16 | - Add feature 1 17 | - Fix feature 1 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-invert-ignore-tags/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for skipping tags 20 | skip_tags = "v0.1.0-beta.1" 21 | # regex for ignoring tags 22 | ignore_tags = "v.*-beta.*" 23 | count_tags = "v0.2.0" 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-invert-ignore-tags/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add skip feature" 5 | git tag v0.1.0-beta.1 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 1" 8 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" 9 | git tag v0.1.0 10 | 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:48" git commit --allow-empty -m "feat: add feature 2" 12 | git tag v0.2.0-beta.1 13 | 14 | GIT_COMMITTER_DATE="2021-01-23 01:23:49" git commit --allow-empty -m "feat: add feature 3" 15 | git tag v0.2.0 16 | -------------------------------------------------------------------------------- /.github/fixtures/test-invert-ignore-tags/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 1 10 | - Fix feature 1 11 | - Add feature 2 12 | - Add feature 3 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-current-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-current-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.2.0](https://github.com/dummy/dummy/compare/v0.1.0...v0.2.0) - 2021-01-24 9 | 10 | ### Added 11 | 12 | - Add feature 2 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-latest-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-latest-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.2.0](https://github.com/dummy/dummy/compare/v0.1.0...v0.2.0) - 2021-01-24 9 | 10 | ### Added 11 | 12 | - Add feature 2 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-no-tags/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | 6 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 7 | 8 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 9 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-no-tags/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] 9 | 10 | ### Added 11 | 12 | - Add feature 1 13 | - Add feature 2 14 | 15 | ### Fixed 16 | 17 | - Fix feature 1 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-one-tag-bump-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "Initial commit" 5 | 6 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 1" 7 | git tag v0.1.0 8 | 9 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-one-tag-bump-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.1.1](https://github.com/dummy/dummy/compare/v0.1.0...v0.1.1) - <> 9 | 10 | ### Fixed 11 | 12 | - Fix feature 1 13 | 14 | ## [0.1.0](https://github.com/dummy/dummy/releases/tag/v0.1.0) - 2021-01-23 15 | 16 | ### Added 17 | 18 | - Add feature 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-one-tag/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-one-tag/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.1.0](https://github.com/dummy/dummy/releases/tag/v0.1.0) - 2021-01-23 9 | 10 | ### Added 11 | 12 | - Add feature 1 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-tag-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-tag-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.3.0](https://github.com/dummy/dummy/compare/v0.2.0...v0.3.0) - <> 9 | 10 | ### Fixed 11 | 12 | - Fix feature 1 13 | 14 | ## [0.2.0](https://github.com/dummy/dummy/compare/v0.1.0...v0.2.0) - 2021-01-24 15 | 16 | ### Added 17 | 18 | - Add feature 2 19 | 20 | ## [0.1.0](https://github.com/dummy/dummy/releases/tag/v0.1.0) - 2021-01-23 21 | 22 | ### Added 23 | 24 | - Add feature 1 25 | 26 | 27 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-unreleased-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links-unreleased-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased](https://github.com/dummy/dummy/compare/v0.2.0...HEAD) 9 | 10 | ### Fixed 11 | 12 | - Fix feature 1 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-24 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | GIT_COMMITTER_DATE="2021-01-25 01:23:47" git commit --allow-empty -m "fix: fix feature 1" 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-keep-a-changelog-links/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased](https://github.com/dummy/dummy/compare/v0.2.0...HEAD) 9 | 10 | ### Fixed 11 | 12 | - Fix feature 1 13 | 14 | ## [0.2.0](https://github.com/dummy/dummy/compare/v0.1.0...v0.2.0) - 2021-01-24 15 | 16 | ### Added 17 | 18 | - Add feature 2 19 | 20 | ## [0.1.0](https://github.com/dummy/dummy/releases/tag/v0.1.0) - 2021-01-23 21 | 22 | ### Added 23 | 24 | - Add feature 1 25 | 26 | 27 | -------------------------------------------------------------------------------- /.github/fixtures/test-latest-with-one-tag/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-latest-with-one-tag/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: initial commit" 5 | 6 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 1" 7 | git tag v0.1.0 8 | -------------------------------------------------------------------------------- /.github/fixtures/test-latest-with-one-tag/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Initial commit 10 | - Add feature 1 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/fixtures/test-limit-commits/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # Limit the total number of commits contained in the changelog. 23 | limit_commits = 2 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-limit-commits/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1 (#1)" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "refactor: move classes" 8 | git tag v0.1.0 9 | -------------------------------------------------------------------------------- /.github/fixtures/test-limit-commits/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### 🐛 Bug Fixes 8 | 9 | - Fix feature 1 (#1) 10 | 11 | ### 🚜 Refactor 12 | 13 | - Move classes 14 | 15 | 16 | -------------------------------------------------------------------------------- /.github/fixtures/test-monorepo-include-path/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for parsing and grouping commits 20 | commit_parsers = [ 21 | { message = "^feat", group = "Features", default_scope = "app" }, 22 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 23 | ] 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-monorepo-include-path/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff 5 | git fetch 6 | mv cliff.toml cliff.toml.bak 7 | git checkout 076feb74b4d8c8634669f57d4e2765c39490d80e 8 | mv cliff.toml.bak cliff.toml 9 | -------------------------------------------------------------------------------- /.github/fixtures/test-monorepo-include-path/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Bug Fixes 8 | 9 | - Include the root commit when `--latest` is used with one tag (#901) 10 | - Match PR and release metadata correctly (#907) 11 | - Fix missing commit fields in context (#837) (#920) 12 | - Preserve first time contributors (#925) 13 | 14 | ### Features 15 | 16 | - Allow overriding the remote API URL via config (#896) 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/fixtures/test-no-exec/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | # An array of regex based postprocessors to modify the changelog. 21 | postprocessors = [ 22 | { pattern = '.*', replace_command = 'this_command_does_not_exist' }, 23 | ] 24 | 25 | [git] 26 | # An array of regex based parsers for extracting data from the commit message. 27 | # Assigns commits to groups. 28 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 29 | commit_parsers = [ 30 | { message = "^feat", group = "Features", default_scope = "app" }, 31 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 32 | ] 33 | # An array of regex based parsers to modify commit messages prior to further processing. 34 | commit_preprocessors = [ 35 | { pattern = '.*', replace_command = "this_command_does_not_exist" }, 36 | ] 37 | -------------------------------------------------------------------------------- /.github/fixtures/test-no-exec/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-no-exec/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-label-grouping/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | body = """ 3 | ### What's changed 4 | {% for group, commits in commits | group_by(attribute="group") %} 5 | #### {{ group }} 6 | {% for commit in commits -%} 7 | - {{ commit.message }} 8 | {% endfor -%}\n 9 | {% endfor %}\n 10 | """ 11 | 12 | [git] 13 | commit_parsers = [ 14 | { field = "author.name", pattern = "testa", group = "TEST A" }, 15 | { field = "author.name", pattern = "testb", group = "TEST B" }, 16 | { field = "author.name", pattern = "testc", group = "TEST C" }, 17 | ] 18 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-label-grouping/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty --author="testa " -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty --author="testa " -m "feat: add feature 2" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty --author="testb " -m "feat: add feature 3" 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty --author="testb " -m "feat: add feature 4" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty --author="testc " -m "feat: add feature 5" 10 | GIT_COMMITTER_DATE="2022-04-06 01:25:14" git commit --allow-empty --author="testc " -m "feat: add feature 6" 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-label-grouping/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ### What's changed 6 | 7 | #### TEST A 8 | - add feature 1 9 | - add feature 2 10 | 11 | #### TEST B 12 | - add feature 3 13 | - add feature 4 14 | 15 | #### TEST C 16 | - add feature 5 17 | - add feature 6 18 | 19 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-replace-parser/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - ({{ commit.scope }}) {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = '^fix\((.*)\)', group = 'Fix (${1}) 🧰' }, 27 | { message = '^feat\((.*)\)', group = 'Feature (${1}) 🚀' }, 28 | { message = "^\\[(.*)\\]", group = "Changes to ${1}", scope = "${1}" }, 29 | ] 30 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-replace-parser/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat(config): add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix(config): fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "[tests]: add tests" 12 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "[codebase]: refactor stuff" 13 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "[codebase]: refactor more stuff" 14 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "[security]: rewrite everything in Rust" 15 | -------------------------------------------------------------------------------- /.github/fixtures/test-regex-replace-parser/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Changes to codebase 8 | 9 | - (codebase) Refactor stuff 10 | - (codebase) Refactor more stuff 11 | 12 | ### Changes to security 13 | 14 | - (security) Rewrite everything in Rust 15 | 16 | ### Changes to tests 17 | 18 | - (tests) Add tests 19 | 20 | ## [0.2.0] - 2022-04-05 21 | 22 | ### Feature (gui) 🚀 23 | 24 | - (gui) Add feature 2 25 | 26 | ### Fix (gui) 🧰 27 | 28 | - (gui) Fix feature 2 29 | 30 | ## [0.1.0] - 2022-04-05 31 | 32 | ### Feature (config) 🚀 33 | 34 | - (config) Add feature 1 35 | 36 | ### Fix (config) 🧰 37 | 38 | - (config) Fix feature 1 39 | 40 | 41 | -------------------------------------------------------------------------------- /.github/fixtures/test-remote-config/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | header = "This is going to be overriden" 3 | -------------------------------------------------------------------------------- /.github/fixtures/test-remote-config/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-remote-config/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | ### Bug Fixes 24 | 25 | - Fix feature 1 26 | 27 | ### Features 28 | 29 | - Add feature 1 30 | 31 | 32 | -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-negative/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # A Tera template to be rendered as the changelog's header. 3 | # See https://keats.github.io/tera/docs/#introduction 4 | header = """ 5 | # Changelog\n 6 | All notable changes to this project will be documented in this file. 7 | """ 8 | # A Tera template to be rendered for each release in the changelog. 9 | # See https://keats.github.io/tera/docs/#introduction 10 | body = """ 11 | {% for group, commits in commits | group_by(attribute="group") %} 12 | ## {{ group | striptags | trim | upper_first }} 13 | {% for commit in commits %} 14 | {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ 15 | {% if commit.breaking %}[**breaking**]: {{ commit.breaking_description }}{% endif %} 16 | {{ commit.message }}: {{ commit.body }}\ 17 | {% for footer in commit.footers %} 18 | - {{ footer.token }}{{ footer.separator }} {{ footer.value }}\ 19 | {% endfor %} 20 | {% endfor %}\ 21 | {% endfor %}\n 22 | """ 23 | 24 | [git] 25 | # Require all commits to be conventional. 26 | # Takes precedence over filter_unconventional. 27 | require_conventional = true 28 | # An array of regex based parsers for extracting data from the commit message. 29 | # Assigns commits to groups. 30 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 31 | commit_parsers = [ 32 | { message = "^feat", group = "Features", default_scope = "app" }, 33 | { message = "^fix" }, 34 | ] 35 | -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-negative/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "This is unconventional." 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m \ 8 | "This is unconventional on multiple lines. 9 | 10 | Line 2 11 | 12 | Some Footer: user3 13 | " 14 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui)!: fix feature 2" 15 | 16 | git tag v0.1.0 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-negative/expected.rc: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-skipped/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for group, commits in commits | group_by(attribute="scope") %} 16 | #### {{ group | upper_first }} 17 | {% for commit in commits %} 18 | - {{ commit.message | upper_first }}\ 19 | {% endfor %} 20 | {% endfor %}\ 21 | {% endfor %}\n 22 | """ 23 | 24 | [git] 25 | # Require all commits to be conventional. 26 | # Takes precedence over filter_unconventional. 27 | require_conventional = true 28 | # An array of regex based parsers for extracting data from the commit message. 29 | # Assigns commits to groups. 30 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 31 | commit_parsers = [ 32 | { message = "^feat", group = "Features", default_scope = "app" }, 33 | { message = "^fix", group = "Bug Fixes", skip = true }, 34 | { message = "Initial commit", skip = true }, 35 | ] 36 | # Prevent commits that are breaking from being excluded by commit parsers. 37 | protect_breaking_commits = true 38 | -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-skipped/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui)!: add feature 2" 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui)!: fix feature 2" 9 | 10 | git tag v0.1.0 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-require-conventional-skipped/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### Bug Fixes 8 | 9 | #### Gui 10 | 11 | - Fix feature 2 12 | 13 | ### Features 14 | 15 | #### App 16 | 17 | - Add feature 1 18 | 19 | #### Gui 20 | 21 | - Add feature 2 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-breaking-changes/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for group, commits in commits | group_by(attribute="scope") %} 16 | #### {{ group | upper_first }} 17 | {% for commit in commits %} 18 | - {{ commit.message | upper_first }}\ 19 | {% endfor %} 20 | {% endfor %}\ 21 | {% endfor %}\n 22 | """ 23 | 24 | [git] 25 | # An array of regex based parsers for extracting data from the commit message. 26 | # Assigns commits to groups. 27 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 28 | commit_parsers = [ 29 | { message = "^feat", group = "Features", default_scope = "app", skip = true }, 30 | { message = "^fix", group = "Bug Fixes", scope = "cli", skip = true }, 31 | ] 32 | # Prevent commits that are breaking from being excluded by commit parsers. 33 | protect_breaking_commits = true 34 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-breaking-changes/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix!: fix feature 1" 7 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui)!: add feature 2" 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui)!: fix feature 2" 9 | git tag v0.1.0 10 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-breaking-changes/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### Bug Fixes 8 | 9 | #### Cli 10 | 11 | - Fix feature 1 12 | - Fix feature 2 13 | 14 | ### Features 15 | 16 | #### Gui 17 | 18 | - Add feature 2 19 | 20 | 21 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-commits/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # An array of regex based parsers for extracting data from the commit message. 23 | # Assigns commits to groups. 24 | # Optionally sets the commit's scope and can decide to exclude commits from further processing. 25 | commit_parsers = [ 26 | { message = "^feat", group = "🚀 Features", default_scope = "app" }, 27 | { message = "^fix", group = "🐛 Bug Fixes", scope = "cli" }, 28 | ] 29 | # Exclude commits that are not matched by any commit parser. 30 | filter_commits = true 31 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-commits/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | git remote add origin https://github.com/orhun/git-cliff-readme-example 5 | git pull origin master 6 | git fetch --tags 7 | { 8 | echo "06412ac1dd4071006c465dde6597a21d4367a158" 9 | echo "81fbc6365484abf0b4f4b05d384175763ad8db44" 10 | echo "e4fd3cf8e2e6f49c0b57f66416e886c37cbb3715" 11 | } >>.cliffignore 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-skip-commits/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### 🚀 Features 8 | 9 | - Support multiple file formats 10 | - Use cache while fetching pages 11 | 12 | ## [1.0.0] - 2021-07-18 13 | 14 | ### 🚀 Features 15 | 16 | - Add ability to parse arrays 17 | 18 | ### 🐛 Bug Fixes 19 | 20 | - Rename help argument due to conflict 21 | 22 | 23 | -------------------------------------------------------------------------------- /.github/fixtures/test-split-commits/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # Split commits on newlines, treating each line as an individual commit. 23 | split_commits = true 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-split-commits/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m \ 6 | "feat: add feature 1 7 | feat: add feature 2 8 | fix: fix feature 1" 9 | 10 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m \ 11 | "chore: bump deps 12 | style: apply formatting 13 | fix: fix feature 2" 14 | 15 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m \ 16 | "test: add initial tests 17 | test: add more tests 18 | test: update assert statements" 19 | 20 | git tag v0.1.0 21 | -------------------------------------------------------------------------------- /.github/fixtures/test-split-commits/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.1.0] - 2022-04-06 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 1 10 | - Add feature 2 11 | 12 | ### 🐛 Bug Fixes 13 | 14 | - Fix feature 1 15 | - Fix feature 2 16 | 17 | ### 💼 Other 18 | 19 | - Initial commit 20 | 21 | ### 🎨 Styling 22 | 23 | - Apply formatting 24 | 25 | ### 🧪 Testing 26 | 27 | - Add initial tests 28 | - Add more tests 29 | - Update assert statements 30 | 31 | ### ⚙️ Miscellaneous Tasks 32 | 33 | - Bump deps 34 | 35 | 36 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules-include-path/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\ 19 | {% for submodule_path, commits in submodule_commits %} 20 | ### {{ submodule_path | upper_first }} 21 | {% for group, commits in commits | group_by(attribute="group") %} 22 | #### {{ group | upper_first }} 23 | {% for commit in commits %} 24 | - {{ commit.message | upper_first }}\ 25 | {% endfor %} 26 | {% endfor %} 27 | {% endfor %}\n 28 | """ 29 | 30 | [git] 31 | # An array of regex based parsers for extracting data from the commit message. 32 | # Assigns commits to groups. 33 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 34 | commit_parsers = [ 35 | { message = "^feat", group = "Features", default_scope = "app" }, 36 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 37 | ] 38 | recurse_submodules = true 39 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules-include-path/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Features 8 | 9 | - Submodule_two update 2 10 | 11 | ### Submodule_two 12 | 13 | #### Bug Fixes 14 | 15 | - Submodule_two fix C 16 | 17 | 18 | ## [0.2.0] - 2022-04-06 19 | 20 | ### Features 21 | 22 | - Submodule_two with initial commits 23 | - Submodule_two update 1 24 | 25 | ### Submodule_two 26 | 27 | #### Bug Fixes 28 | 29 | - Submodule_two fix B 30 | 31 | #### Features 32 | 33 | - Submodule_two feature B 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules-range/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\ 19 | {% for submodule_path, commits in submodule_commits %} 20 | ### {{ submodule_path | upper_first }} 21 | {% for group, commits in commits | group_by(attribute="group") %} 22 | #### {{ group | upper_first }} 23 | {% for commit in commits %} 24 | - {{ commit.message | upper_first }}\ 25 | {% endfor %} 26 | {% endfor %} 27 | {% endfor %}\n 28 | """ 29 | 30 | [git] 31 | # An array of regex based parsers for extracting data from the commit message. 32 | # Assigns commits to groups. 33 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 34 | commit_parsers = [ 35 | { message = "^feat", group = "Features", default_scope = "app" }, 36 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 37 | ] 38 | recurse_submodules = true 39 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules-range/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Features 8 | 9 | - Submodule_two update 2 10 | 11 | ### Submodule_two 12 | 13 | #### Bug Fixes 14 | 15 | - Submodule_two fix C 16 | 17 | 18 | ## [0.2.0] - 2022-04-06 19 | 20 | ### Features 21 | 22 | - Submodule_two with initial commits 23 | - Submodule_two update 1 24 | 25 | ### Submodule_two 26 | 27 | #### Bug Fixes 28 | 29 | - Submodule_two fix B 30 | 31 | #### Features 32 | 33 | - Submodule_two feature B 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\ 19 | {% for submodule_path, commits in submodule_commits %} 20 | ### {{ submodule_path | upper_first }} 21 | {% for group, commits in commits | group_by(attribute="group") %} 22 | #### {{ group | upper_first }} 23 | {% for commit in commits %} 24 | - {{ commit.message | upper_first }}\ 25 | {% endfor %} 26 | {% endfor %} 27 | {% endfor %}\n 28 | """ 29 | 30 | [git] 31 | # An array of regex based parsers for extracting data from the commit message. 32 | # Assigns commits to groups. 33 | # Optionally sets the commit's `scope` and can decide to exclude commits from further processing. 34 | commit_parsers = [ 35 | { message = "^feat", group = "Features", default_scope = "app" }, 36 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 37 | ] 38 | recurse_submodules = true 39 | -------------------------------------------------------------------------------- /.github/fixtures/test-submodules/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Features 8 | 9 | - Submodule_two update 2 10 | 11 | ### Submodule_two 12 | 13 | #### Bug Fixes 14 | 15 | - Submodule_two fix C 16 | 17 | 18 | ## [0.2.0] - 2022-04-06 19 | 20 | ### Features 21 | 22 | - Submodule_two with initial commits 23 | - Submodule_two update 1 24 | 25 | ### Submodule_two 26 | 27 | #### Bug Fixes 28 | 29 | - Submodule_two fix B 30 | 31 | #### Features 32 | 33 | - Submodule_two feature B 34 | 35 | 36 | ## [0.1.0] - 2022-04-06 37 | 38 | ### Features 39 | 40 | - Add submodule_one 41 | - Submodule_one update 1 42 | 43 | ### Submodule_one 44 | 45 | #### Bug Fixes 46 | 47 | - Submodule_one fix A 48 | 49 | #### Features 50 | 51 | - Submodule_one feature A 52 | - Submodule_one initial commit 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /.github/fixtures/test-tag-message/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% if message %} 8 | {{ message }} 9 | {% endif %}\ 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # regex for parsing and grouping commits 23 | commit_parsers = [ 24 | { message = "^feat", group = "Features", default_scope = "app" }, 25 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 26 | ] 27 | -------------------------------------------------------------------------------- /.github/fixtures/test-tag-message/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 -m "Some text" 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 01:25:13" git commit --allow-empty -m "test: add tests" 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-tag-message/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### Test 8 | 9 | - Add tests 10 | 11 | ## [0.2.0] - 2022-04-06 12 | 13 | ### Bug Fixes 14 | 15 | - Fix feature 2 16 | 17 | ### Features 18 | 19 | - Add feature 2 20 | 21 | ## [0.1.0] - 2022-04-06 22 | 23 | Some text 24 | 25 | ### Bug Fixes 26 | 27 | - Fix feature 1 28 | 29 | ### Features 30 | 31 | - Add feature 1 32 | 33 | 34 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-arg/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-arg/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | git checkout v0.1.0 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" 12 | git tag v0.1.1 13 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-arg/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 2 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-commits/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | 5 | [git] 6 | 7 | topo_order_commits = false -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-commits/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 03:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 03:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 03:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 03:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 03:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | GIT_COMMITTER_DATE="2022-04-06 03:25:25" git commit --allow-empty -m "test: add tests" 12 | GIT_COMMITTER_DATE="2022-04-06 03:25:25" git checkout v0.1.0 13 | GIT_COMMITTER_DATE="2022-04-06 03:25:13" git commit --allow-empty -m "fix: fix again feature 1" 14 | git tag v0.1.1 15 | git checkout master 16 | git merge v0.1.1 --no-edit 17 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order-commits/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [unreleased] 6 | 7 | ### 🧪 Testing 8 | 9 | - Add tests 10 | 11 | ## [0.1.1] - 2022-04-06 12 | 13 | ### 🐛 Bug Fixes 14 | 15 | - Fix again feature 1 16 | 17 | ## [0.2.0] - 2022-04-06 18 | 19 | ### 🚀 Features 20 | 21 | - *(gui)* Add feature 2 22 | 23 | ### 🐛 Bug Fixes 24 | 25 | - *(gui)* Fix feature 2 26 | 27 | ## [0.1.0] - 2022-04-06 28 | 29 | ### 🚀 Features 30 | 31 | - Add feature 1 32 | 33 | ### 🐛 Bug Fixes 34 | 35 | - Fix feature 1 36 | 37 | 38 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order/cliff.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 10 | {% else %}\ 11 | ## [unreleased] 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %} 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\ 17 | {% endfor %} 18 | {% endfor %}\n 19 | """ 20 | 21 | [git] 22 | # Order releases topologically instead of chronologically. 23 | topo_order = true 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2021-01-23 01:23:45" git commit --allow-empty -m "feat: add feature 1" 5 | git tag v0.1.0 6 | 7 | GIT_COMMITTER_DATE="2021-01-23 01:23:46" git commit --allow-empty -m "feat: add feature 2" 8 | git tag v0.2.0 9 | 10 | git checkout v0.1.0 11 | GIT_COMMITTER_DATE="2021-01-23 01:23:47" git commit --allow-empty -m "feat: fix feature 1" 12 | git tag v0.1.1 13 | -------------------------------------------------------------------------------- /.github/fixtures/test-topo-order/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] - 2021-01-23 6 | 7 | ### 🚀 Features 8 | 9 | - Add feature 2 10 | 11 | 12 | -------------------------------------------------------------------------------- /.github/fixtures/test-unchanged-tag-date/cliff.toml: -------------------------------------------------------------------------------- 1 | [changelog] 2 | # template for the changelog body 3 | # https://keats.github.io/tera/docs/#introduction 4 | body = """ 5 | {% if version %}\ 6 | ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} 7 | {% else %}\ 8 | ## [unreleased] 9 | {% endif %}\ 10 | {% for group, commits in commits | group_by(attribute="group") %} 11 | ### {{ group | upper_first }} 12 | {% for commit in commits %} 13 | - {{ commit.message | upper_first }}\ 14 | {% endfor %} 15 | {% endfor %}\n 16 | """ 17 | 18 | [git] 19 | # regex for parsing and grouping commits 20 | commit_parsers = [ 21 | { message = "^feat", group = "Features", default_scope = "app" }, 22 | { message = "^fix", group = "Bug Fixes", scope = "cli" }, 23 | ] 24 | -------------------------------------------------------------------------------- /.github/fixtures/test-unchanged-tag-date/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | GIT_COMMITTER_DATE="2022-04-06 01:25:08" git commit --allow-empty -m "Initial commit" 5 | GIT_COMMITTER_DATE="2022-04-06 01:25:09" git commit --allow-empty -m "feat: add feature 1" 6 | GIT_COMMITTER_DATE="2022-04-06 01:25:10" git commit --allow-empty -m "fix: fix feature 1" 7 | git tag v0.1.0 8 | GIT_COMMITTER_DATE="2022-04-06 01:25:11" git commit --allow-empty -m "feat(gui): add feature 2" 9 | GIT_COMMITTER_DATE="2022-04-06 01:25:12" git commit --allow-empty -m "fix(gui): fix feature 2" 10 | git tag v0.2.0 11 | -------------------------------------------------------------------------------- /.github/fixtures/test-unchanged-tag-date/expected.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [0.2.0] - 2022-04-06 6 | 7 | ### Bug Fixes 8 | 9 | - Fix feature 2 10 | 11 | ### Features 12 | 13 | - Add feature 2 14 | 15 | ## [0.1.0] - 2022-04-06 16 | 17 | ### Bug Fixes 18 | 19 | - Fix feature 1 20 | 21 | ### Features 22 | 23 | - Add feature 1 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: Automatic merge for Dependabot pull requests 3 | conditions: 4 | - author=dependabot[bot] 5 | actions: 6 | merge: 7 | method: squash 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled files and executables 2 | /target/ 3 | 4 | # Backup files generated by rustfmt 5 | **/*.rs.bk 6 | 7 | *.flamegraph.svg 8 | 9 | # direnv 10 | /.direnv/ 11 | 12 | # Potential Nix stuff 13 | /result 14 | /result-* 15 | -------------------------------------------------------------------------------- /.lycheeignore: -------------------------------------------------------------------------------- 1 | file:/// 2 | %7Busername%7D 3 | https://datatracker.ietf.org 4 | protonmail 5 | https://github.com/cocogitto/cocogitto 6 | pypi.org 7 | https://console.substack.com 8 | git-cliff/commit/ 9 | patreon 10 | -------------------------------------------------------------------------------- /.well-known/funding-manifest-urls: -------------------------------------------------------------------------------- 1 | https://orhun.dev/funding.json 2 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | git-cliff.org -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | members = ["git-cliff-core", "git-cliff"] 4 | 5 | [workspace.dependencies] 6 | regex = "1.11.1" 7 | glob = "0.3.2" 8 | log = "0.4.21" 9 | secrecy = { version = "0.8.0", features = ["serde"] } 10 | lazy_static = "1.5.0" 11 | dirs = "5.0.1" 12 | url = "2.5.3" 13 | reqwest = { version = "0.12.12", default-features = false, features = [ 14 | "blocking", 15 | "rustls-tls", 16 | "rustls-tls-native-roots", 17 | "json", 18 | "zstd", 19 | ] } 20 | 21 | [profile.dev] 22 | opt-level = 0 23 | debug = true 24 | panic = "abort" 25 | 26 | [profile.test] 27 | opt-level = 0 28 | debug = true 29 | 30 | [profile.release] 31 | opt-level = 3 32 | debug = false 33 | panic = "unwind" 34 | lto = true 35 | codegen-units = 1 36 | strip = true 37 | 38 | [profile.bench] 39 | opt-level = 3 40 | debug = true # used by the profiler 41 | strip = false # keep symbols for the profiler 42 | 43 | [workspace.lints.clippy] 44 | literal_string_with_formatting_args = "allow" 45 | tabs_in_doc_comments = "allow" 46 | needless_raw_string_hashes = "allow" 47 | unreadable_literal = "allow" 48 | redundant_else = "allow" 49 | items_after_statements = "allow" 50 | missing_errors_doc = "allow" 51 | module_name_repetitions = "allow" 52 | uninlined_format_args = "allow" 53 | manual_string_new = "allow" 54 | must_use_candidate = "allow" 55 | too_many_lines = "allow" 56 | wildcard_imports = "allow" 57 | missing_panics_doc = "allow" 58 | inefficient_to_string = "allow" 59 | redundant_closure_for_method_calls = "allow" 60 | map_unwrap_or = "allow" 61 | struct_excessive_bools = "allow" 62 | unnecessary_wraps = "allow" 63 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021-2025 Orhun Parmaksız 4 | Copyright (c) 2021-2025 git-cliff contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Creating a Release 2 | 3 | [GitHub](https://github.com/orhun/git-cliff/releases), [crates.io](https://crates.io/crates/git-cliff/) and [Docker Hub](https://hub.docker.com/r/orhunp/git-cliff) releases are automated via [GitHub actions](./.github/workflows/cd.yml) and triggered by pushing a tag. 4 | 5 | 1. Run the [release script](./release.sh): `./release.sh v[X.Y.Z]` 6 | 2. Push the changes: `git push` 7 | 3. Check if [Continuous Integration](https://github.com/orhun/git-cliff/actions) workflow is completed successfully. 8 | 4. Push the tags: `git push --tags` 9 | 5. Wait for [Continuous Deployment](https://github.com/orhun/git-cliff/actions) workflow to finish. 10 | - Do not forget to set `vars.USE_TESTPYPI` variable to `false` before release. 11 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | If you wish to report a security vulnerability privately, we appreciate your diligence. Please follow the guidelines below to submit your report. 4 | 5 | ## Supported Versions 6 | 7 | The following versions are supported with security updates: 8 | 9 | | Version | Supported | 10 | | ------- | ------------------ | 11 | | 2.x.x | :white_check_mark: | 12 | | 1.x.x | :white_check_mark: | 13 | | 1.0.x | :x: | 14 | | < 0.1.0 | :x: | 15 | 16 | ## Reporting 17 | 18 | To report a security vulnerability, please provide the following information: 19 | 20 | 1. **PUBLIC** 21 | 22 | - Indicate whether this vulnerability has already been publicly discussed or disclosed. 23 | - If so, provide relevant links. 24 | 25 | 2. **DESCRIPTION** 26 | - Provide a detailed description of the security vulnerability. 27 | - Include as much information as possible to help us understand and address the issue. 28 | 29 | Send this information, along with any additional relevant details, to . 30 | 31 | ## Confidentiality 32 | 33 | We kindly ask you to keep the report confidential until a public announcement is made. 34 | 35 | ## Notes 36 | 37 | - Vulnerabilities will be handled on a best-effort basis. 38 | - You may request an advance copy of the patched release, but we cannot guarantee early access before the public release. 39 | - You will be notified via email simultaneously with the public announcement. 40 | - We will respond within a few weeks to confirm whether your report has been accepted or rejected. 41 | 42 | Thank you for helping to improve the security of **git-cliff**! ⛰️ 43 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | range: 50..75 3 | round: up 4 | precision: 2 5 | status: 6 | project: 7 | default: 8 | target: auto 9 | threshold: 5% 10 | branches: 11 | - main 12 | if_ci_failed: error 13 | patch: off 14 | -------------------------------------------------------------------------------- /examples/minimal.toml: -------------------------------------------------------------------------------- 1 | # git-cliff ~ configuration file 2 | # https://git-cliff.org/docs/configuration 3 | 4 | [changelog] 5 | # A Tera template to be rendered for each release in the changelog. 6 | # See https://keats.github.io/tera/docs/#introduction 7 | body = """ 8 | {% if version %}\ 9 | ## {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}\ 10 | {% else %}\ 11 | ## Unreleased\ 12 | {% endif %}\ 13 | {% for group, commits in commits | group_by(attribute="group") %} 14 | ### {{ group | upper_first }} 15 | {% for commit in commits %}\ 16 | - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} 17 | {% endfor %}\ 18 | {% endfor %}\n 19 | """ 20 | -------------------------------------------------------------------------------- /git-cliff-core/src/contributor.rs: -------------------------------------------------------------------------------- 1 | use serde::{ 2 | Deserialize, 3 | Serialize, 4 | }; 5 | use std::hash::{ 6 | Hash, 7 | Hasher, 8 | }; 9 | 10 | /// Representation of a remote contributor. 11 | #[derive(Debug, Default, Clone, Eq, PartialEq, Deserialize, Serialize)] 12 | pub struct RemoteContributor { 13 | /// Username. 14 | pub username: Option, 15 | /// Title of the pull request. 16 | pub pr_title: Option, 17 | /// The pull request that the user created. 18 | pub pr_number: Option, 19 | /// Labels of the pull request. 20 | pub pr_labels: Vec, 21 | /// Whether if the user contributed for the first time. 22 | pub is_first_time: bool, 23 | } 24 | 25 | impl Hash for RemoteContributor { 26 | fn hash(&self, state: &mut H) { 27 | self.username.hash(state); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /git-cliff-core/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! A highly customizable changelog generator ⛰️ 2 | //! 3 | //! The crate provides a set of optional features that can be enabled in your 4 | //! `Cargo.toml` file. 5 | //! 6 | //! ## Features 7 | #![cfg_attr(feature = "document-features", doc = document_features::document_features!())] 8 | #![cfg_attr(docsrs, feature(doc_auto_cfg))] 9 | #![warn(missing_docs, clippy::unwrap_used)] 10 | #![doc( 11 | html_logo_url = "https://raw.githubusercontent.com/orhun/git-cliff/main/website/static/img/git-cliff.png", 12 | html_favicon_url = "https://raw.githubusercontent.com/orhun/git-cliff/main/website/static/favicon/favicon.ico" 13 | )] 14 | 15 | /// Changelog generator. 16 | pub mod changelog; 17 | /// Command runner. 18 | pub mod command; 19 | /// Git commit. 20 | pub mod commit; 21 | /// Config file parser. 22 | pub mod config; 23 | /// Remote contributor. 24 | pub mod contributor; 25 | /// Embedded file handler. 26 | pub mod embed; 27 | /// Error handling. 28 | pub mod error; 29 | /// Common release type. 30 | pub mod release; 31 | /// Remote handler. 32 | #[cfg(feature = "remote")] 33 | #[allow(async_fn_in_trait)] 34 | pub mod remote; 35 | /// Git repository. 36 | #[cfg(feature = "repo")] 37 | pub mod repo; 38 | /// Git tag. 39 | pub mod tag; 40 | /// Template engine. 41 | pub mod template; 42 | 43 | #[macro_use] 44 | extern crate log; 45 | 46 | /// Default configuration file. 47 | pub const DEFAULT_CONFIG: &str = "cliff.toml"; 48 | /// Default output file. 49 | pub const DEFAULT_OUTPUT: &str = "CHANGELOG.md"; 50 | /// Default ignore file. 51 | pub const IGNORE_FILE: &str = ".cliffignore"; 52 | -------------------------------------------------------------------------------- /git-cliff-core/src/tag.rs: -------------------------------------------------------------------------------- 1 | /// Common tag object that is parsed from a repository. 2 | /// 3 | /// Lightweight tags will have `None` as message. 4 | #[derive(Debug)] 5 | pub struct Tag { 6 | /// The name of the tag 7 | pub name: String, 8 | /// The message of the tag (only if it was annotated). 9 | pub message: Option, 10 | } 11 | 12 | #[cfg(test)] 13 | mod test { 14 | use super::*; 15 | 16 | #[test] 17 | fn create_tag_with_name_and_message() { 18 | let tag = Tag { 19 | name: String::from("v1.0"), 20 | message: Some(String::from("Initial release")), 21 | }; 22 | assert_eq!(tag.name, "v1.0"); 23 | assert_eq!(tag.message, Some(String::from("Initial release"))); 24 | } 25 | 26 | #[test] 27 | fn create_tag_with_name_and_no_message() { 28 | let tag = Tag { 29 | name: String::from("v1.0"), 30 | message: None, 31 | }; 32 | assert_eq!(tag.name, "v1.0"); 33 | assert_eq!(tag.message, None); 34 | } 35 | 36 | #[test] 37 | fn debug_print_tag_with_message() { 38 | let tag = Tag { 39 | name: String::from("v1.0"), 40 | message: Some(String::from("Initial release")), 41 | }; 42 | assert_eq!( 43 | format!("{:?}", tag), 44 | "Tag { name: \"v1.0\", message: Some(\"Initial release\") }" 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /git-cliff/examples/run.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use git_cliff::args::Opt; 3 | use git_cliff_core::error::Result; 4 | 5 | fn main() -> Result<()> { 6 | let args = Opt::parse(); 7 | git_cliff::run(args)?; 8 | Ok(()) 9 | } 10 | -------------------------------------------------------------------------------- /git-cliff/src/bin/completions.rs: -------------------------------------------------------------------------------- 1 | use clap::{ 2 | CommandFactory, 3 | ValueEnum, 4 | }; 5 | use clap_complete::Shell; 6 | use git_cliff::args::Opt; 7 | use std::env; 8 | use std::io::Result; 9 | 10 | /// Shell completions can be created with: 11 | /// `cargo run --bin git-cliff-completions` 12 | /// in a directory specified by the environment variable `OUT_DIR`. 13 | /// See 14 | fn main() -> Result<()> { 15 | let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set"); 16 | let mut app = Opt::command(); 17 | for &shell in Shell::value_variants() { 18 | clap_complete::generate_to( 19 | shell, 20 | &mut app, 21 | env!("CARGO_PKG_NAME"), 22 | &out_dir, 23 | )?; 24 | } 25 | println!("Completion scripts are generated in {out_dir:?}"); 26 | Ok(()) 27 | } 28 | -------------------------------------------------------------------------------- /git-cliff/src/bin/mangen.rs: -------------------------------------------------------------------------------- 1 | use clap::CommandFactory; 2 | use clap_mangen::Man; 3 | use git_cliff::args::Opt; 4 | use std::env; 5 | use std::fs; 6 | use std::io::Result; 7 | use std::path::PathBuf; 8 | 9 | /// Man page can be created with: 10 | /// `cargo run --bin git-cliff-mangen` 11 | /// in a directory specified by the environment variable `OUT_DIR`. 12 | /// See 13 | fn main() -> Result<()> { 14 | let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set"); 15 | let out_path = 16 | PathBuf::from(out_dir).join(format!("{}.1", env!("CARGO_PKG_NAME"))); 17 | let app = Opt::command(); 18 | let man = Man::new(app); 19 | let mut buffer = Vec::::new(); 20 | man.render(&mut buffer)?; 21 | fs::write(&out_path, buffer)?; 22 | println!("Man page is generated at {out_path:?}"); 23 | Ok(()) 24 | } 25 | -------------------------------------------------------------------------------- /git-cliff/src/main.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use git_cliff::args::Opt; 3 | use git_cliff::logger; 4 | use git_cliff_core::error::Result; 5 | use std::env; 6 | use std::process; 7 | 8 | /// Profiler. 9 | #[cfg(feature = "profiler")] 10 | mod profiler; 11 | 12 | fn main() -> Result<()> { 13 | // Parse the command line arguments 14 | let args = Opt::parse(); 15 | if args.verbose == 1 { 16 | unsafe { env::set_var("RUST_LOG", "debug") }; 17 | } else if args.verbose > 1 { 18 | unsafe { env::set_var("RUST_LOG", "trace") }; 19 | } else if env::var_os("RUST_LOG").is_none() { 20 | unsafe { env::set_var("RUST_LOG", "info") }; 21 | } 22 | logger::init()?; 23 | 24 | // Initialize the profiler guard if the feature is enabled 25 | let mut _profiler_guard = None; 26 | #[cfg(feature = "profiler")] 27 | { 28 | _profiler_guard = profiler::start_profiling(); 29 | } 30 | #[cfg(not(feature = "profiler"))] 31 | { 32 | _profiler_guard = Some(()); 33 | } 34 | 35 | // Run git-cliff 36 | let exit_code = match git_cliff::run(args) { 37 | Ok(()) => 0, 38 | Err(e) => { 39 | log::error!("{}", e); 40 | 1 41 | } 42 | }; 43 | 44 | // Report the profiler if the feature is enabled 45 | #[cfg(feature = "profiler")] 46 | { 47 | profiler::finish_profiling(_profiler_guard)?; 48 | } 49 | 50 | process::exit(exit_code); 51 | } 52 | -------------------------------------------------------------------------------- /git-cliff/src/profiler.rs: -------------------------------------------------------------------------------- 1 | use git_cliff_core::error::Result; 2 | 3 | /// Creates a profiler guard and returns it. 4 | pub(crate) fn start_profiling() -> Option> { 5 | match pprof::ProfilerGuardBuilder::default() 6 | .frequency(1000) 7 | .blocklist(&["libc", "libgcc", "pthread", "vdso"]) 8 | .build() 9 | { 10 | Ok(guard) => Some(guard), 11 | Err(e) => { 12 | log::error!("failed to build profiler guard: {e}"); 13 | None 14 | } 15 | } 16 | } 17 | 18 | /// Reports the profiling results. 19 | pub(crate) fn finish_profiling( 20 | profiler_guard: Option, 21 | ) -> Result<()> { 22 | match profiler_guard 23 | .expect("failed to retrieve profiler guard") 24 | .report() 25 | .build() 26 | { 27 | Ok(report) => { 28 | #[cfg(feature = "profiler-flamegraph")] 29 | { 30 | use std::fs::File; 31 | let random = rand::random::(); 32 | let file = File::create(format!( 33 | "{}.{random}.flamegraph.svg", 34 | env!("CARGO_PKG_NAME"), 35 | ))?; 36 | if let Err(e) = report.flamegraph(file) { 37 | log::error!("failed to create flamegraph file: {e}"); 38 | } 39 | } 40 | 41 | #[cfg(not(feature = "profiler-flamegraph"))] 42 | { 43 | log::info!("profiling report: {:?}", &report); 44 | } 45 | } 46 | Err(e) => { 47 | log::error!("failed to build profiler report: {e}"); 48 | } 49 | } 50 | 51 | Ok(()) 52 | } 53 | -------------------------------------------------------------------------------- /npm/git-cliff/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | enableGlobalCache: true 2 | 3 | nodeLinker: node-modules 4 | 5 | yarnPath: .yarn/releases/yarn-4.1.0.cjs 6 | -------------------------------------------------------------------------------- /npm/git-cliff/eslint.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | import eslint from "@eslint/js"; 4 | import tseslint from "typescript-eslint"; 5 | 6 | export default tseslint.config( 7 | eslint.configs.recommended, 8 | ...tseslint.configs.recommended, 9 | { 10 | languageOptions: { 11 | parserOptions: { 12 | project: "./tsconfig.json", 13 | }, 14 | }, 15 | } 16 | ); 17 | -------------------------------------------------------------------------------- /npm/git-cliff/src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { runGitCliff } from "./index.js"; 4 | 5 | async function run() { 6 | const args = process.argv.slice(2); 7 | const processResult = await runGitCliff(args); 8 | 9 | process.exit(processResult.exitCode ?? 0); 10 | } 11 | 12 | void run(); 13 | -------------------------------------------------------------------------------- /npm/git-cliff/src/getExePath.ts: -------------------------------------------------------------------------------- 1 | import { arch as getArch, platform as getPlatform } from "os"; 2 | 3 | /** 4 | * Returns the executable path for git-cliff located inside node_modules 5 | * The naming convention is git-cliff-${os}-${arch} 6 | * If the platform is `win32` or `cygwin`, executable will include a `.exe` extension 7 | * @see https://nodejs.org/api/os.html#osarch 8 | * @see https://nodejs.org/api/os.html#osplatform 9 | * @example "x/xx/node_modules/git-cliff-darwin-arm64" 10 | */ 11 | export async function getExePath() { 12 | const platform = getPlatform(); 13 | const arch = getArch(); 14 | 15 | let os = platform as string; 16 | let extension = ""; 17 | 18 | if (platform === "win32" || platform === "cygwin") { 19 | os = "windows"; 20 | extension = ".exe"; 21 | } 22 | 23 | try { 24 | // Since the bin will be located inside `node_modules`, we can simply call import.meta.resolve 25 | return import.meta.resolve( 26 | `git-cliff-${os}-${arch}/bin/git-cliff${extension}`, 27 | ); 28 | } catch (e) { 29 | throw new Error( 30 | `Couldn't find git-cliff binary inside node_modules for ${os}-${arch} (${e})`, 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /npm/git-cliff/src/optionsToStringArgs.ts: -------------------------------------------------------------------------------- 1 | import type { Options } from "./options.js"; 2 | 3 | /** 4 | * Transforms a JavaScript object of options into an array 5 | * of strings that can be passed to {@link execa} for calling `git-cliff` 6 | * 7 | * @param options The options to transform 8 | * @returns The options as an array of strings 9 | */ 10 | export function optionsToStringArgs(options: Options): string[] { 11 | const args: string[] = []; 12 | 13 | for (const [key, value] of Object.entries(options)) { 14 | const hyphenCaseKey = key.replace(/([A-Z])/g, "-$1").toLowerCase(); 15 | 16 | if (Array.isArray(value)) { 17 | for (const arrValue of value) { 18 | args.push(`--${hyphenCaseKey}`, arrValue); 19 | } 20 | } else if (value === true) { 21 | args.push(`--${hyphenCaseKey}`); 22 | } else if (value === false || value === null) { 23 | continue; 24 | } else { 25 | args.push(`--${hyphenCaseKey}`, value); 26 | } 27 | } 28 | 29 | return args; 30 | } 31 | -------------------------------------------------------------------------------- /npm/git-cliff/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "module": "node16", 5 | "moduleResolution": "node16", 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "resolveJsonModule": true, 10 | "noEmit": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /npm/git-cliff/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, type Options } from "tsup"; 2 | import { dependencies } from "./package.json"; 3 | 4 | const baseOptions: Options = { 5 | clean: true, 6 | dts: true, 7 | entry: ["src/index.ts"], 8 | minify: false, 9 | external: Object.keys(dependencies), 10 | sourcemap: true, 11 | target: "es2020", 12 | tsconfig: "tsconfig.json", 13 | keepNames: true, 14 | treeshake: true, 15 | }; 16 | 17 | export default [ 18 | defineConfig({ 19 | ...baseOptions, 20 | outDir: "lib/cjs", 21 | format: "cjs", 22 | }), 23 | defineConfig({ 24 | ...baseOptions, 25 | outDir: "lib/esm", 26 | format: "esm", 27 | }), 28 | defineConfig({ 29 | ...baseOptions, 30 | outDir: "lib/cli", 31 | entry: ["src/cli.ts"], 32 | dts: false, 33 | sourcemap: false, 34 | format: "esm", 35 | }), 36 | ]; 37 | -------------------------------------------------------------------------------- /npm/package.json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | "name": "${node_pkg}", 3 | "version": "${version}", 4 | "description": "A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/orhun/git-cliff.git" 8 | }, 9 | "keywords": [ 10 | "git-cliff", 11 | "git", 12 | "changelog", 13 | "change log", 14 | "CHANGELOG.md", 15 | "commit messages", 16 | "commits", 17 | "changes", 18 | "unreleased", 19 | "history", 20 | "what's new", 21 | "change set", 22 | "conventionalcommits.org", 23 | "conventional", 24 | "conventional-commit", 25 | "conventional-changelog", 26 | "releases", 27 | "release notes", 28 | "git-changelog", 29 | "versioning", 30 | "semver", 31 | "distribution", 32 | "semantic", 33 | "semantic versioning", 34 | "parser", 35 | "changelog-generator", 36 | "generator", 37 | "keepachangelog", 38 | "keep-a-changelog", 39 | "commit", 40 | "automation", 41 | "rust" 42 | ], 43 | "author": "git-cliff contributors ", 44 | "license": "MIT OR Apache-2.0", 45 | "bugs": { 46 | "url": "https://github.com/orhun/git-cliff/issues" 47 | }, 48 | "homepage": "https://github.com/orhun/git-cliff#readme", 49 | "os": [ 50 | "${node_os}" 51 | ], 52 | "cpu": [ 53 | "${node_arch}" 54 | ], 55 | "publishConfig": { 56 | "access": "public" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /pypi/.gitignore: -------------------------------------------------------------------------------- 1 | # venv dir which might be present during testing 2 | .venv 3 | 4 | # where the build artifacts go 5 | wheels 6 | -------------------------------------------------------------------------------- /pypi/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin>=1.5,<2"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "git-cliff" 7 | requires-python = ">=3.7" 8 | classifiers = [ 9 | "Intended Audience :: Developers", 10 | "Topic :: Software Development", 11 | "Programming Language :: Rust", 12 | "Programming Language :: Python :: Implementation :: CPython", 13 | "Programming Language :: Python :: Implementation :: PyPy", 14 | ] 15 | 16 | [tool.maturin] 17 | bindings = "bin" 18 | manifest-path = "../git-cliff/Cargo.toml" 19 | module-name = "git-cliff" 20 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly" 3 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | edition = "2024" 2 | max_width = 85 3 | newline_style = "Unix" 4 | hard_tabs = true 5 | tab_spaces = 4 6 | use_field_init_shorthand = true 7 | reorder_imports = true 8 | binop_separator = "Back" 9 | format_code_in_doc_comments = true 10 | format_strings = true 11 | imports_layout = "Vertical" 12 | normalize_doc_attributes = true 13 | overflow_delimited_expr = true 14 | struct_field_align_threshold = 20 15 | wrap_comments = true 16 | -------------------------------------------------------------------------------- /typos.toml: -------------------------------------------------------------------------------- 1 | # configuration for https://github.com/crate-ci/typos 2 | 3 | [type.md] 4 | extend-ignore-re = [ 5 | "\\[[[:xdigit:]]{7}\\]\\(https://github.com/orhun/git-cliff/commit/[[:xdigit:]]{40}\\)", 6 | "\\[halp\\]\\(https://github.com/orhun/halp\\)", 7 | "upport", 8 | ] 9 | 10 | [default.extend-words] 11 | upport = "upport" 12 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | 11 | # Misc 12 | .DS_Store 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | 18 | npm-debug.log* 19 | yarn-debug.log* 20 | yarn-error.log* 21 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. 4 | 5 | ### Installation 6 | 7 | ``` 8 | $ yarn 9 | ``` 10 | 11 | ### Local Development 12 | 13 | ``` 14 | $ yarn start 15 | ``` 16 | 17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. 18 | 19 | ### Build 20 | 21 | ``` 22 | $ yarn build 23 | ``` 24 | 25 | This command generates static content into the `build` directory and can be served using any static contents hosting service. 26 | 27 | ### Deployment 28 | 29 | Using SSH: 30 | 31 | ``` 32 | $ USE_SSH=true yarn deploy 33 | ``` 34 | 35 | Not using SSH: 36 | 37 | ``` 38 | $ GIT_USER= yarn deploy 39 | ``` 40 | 41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. 42 | -------------------------------------------------------------------------------- /website/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /website/blog/authors.yml: -------------------------------------------------------------------------------- 1 | orhun: 2 | name: Orhun Parmaksız 3 | title: Author of git-cliff 4 | url: https://github.com/orhun 5 | image_url: https://github.com/orhun.png 6 | -------------------------------------------------------------------------------- /website/docs/configuration/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | # Configuration 5 | 6 | **git-cliff** configuration file supports [TOML](https://github.com/toml-lang/toml) (preferred) and [YAML](https://yaml.org) formats. 7 | 8 | The configuration file is read from `$HOME/git-cliff/cliff.toml` if the file exists. This location depends on the platform, for example: 9 | 10 | - on Linux: `/home//.config/git-cliff/cliff.toml` 11 | - on Windows: `C:\Users\\AppData\Roaming\git-cliff\cliff.toml` 12 | - on macOS: `/Users//Library/Application Support/git-cliff/cliff.toml` 13 | 14 | See [cliff.toml](https://github.com/orhun/git-cliff/blob/main/config/cliff.toml) for the default configuration values. 15 | 16 | ## Environment Configuration Overrides 17 | 18 | It's possible to use environment variables to override configuration elements. If an environment variable matches a configuration element, the variable's value will be used instead of the element's. 19 | 20 | Format: 21 | 22 | ``` 23 | [PREFIX]__[CONFIG SECTION]__[FIELD NAME] 24 | ``` 25 | 26 | #### Examples 27 | 28 | To override the `footer` element: 29 | 30 | ```bash 31 | export GIT_CLIFF__CHANGELOG__FOOTER="" 32 | ``` 33 | 34 | To override the `ignore_tags` element: 35 | 36 | ```bash 37 | export GIT_CLIFF__GIT__IGNORE_TAGS="v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" 38 | ``` 39 | -------------------------------------------------------------------------------- /website/docs/development/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Development", 3 | "position": 12, 4 | "link": { 5 | "type": "generated-index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /website/docs/development/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | See the contributing guide [on GitHub](https://github.com/orhun/git-cliff/blob/main/CONTRIBUTING.md). 4 | -------------------------------------------------------------------------------- /website/docs/development/profiling.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | # Performance Profiling 5 | 6 | **git-cliff** can be built with performance profiling instrumentation, which helps with finding bottlenecks. 7 | 8 | The profiler can be enabled via the `profiler` feature and the `bench` build profile. 9 | 10 | ```bash 11 | cargo build --profile=bench --features=profiler 12 | ``` 13 | 14 | To create a flame graph SVG: 15 | 16 | ```bash 17 | cargo run --profile=bench --features=profiler 18 | ``` 19 | 20 | e.g. 21 | 22 | ![flamegraph example](https://github.com/user-attachments/assets/d29339a5-1c82-4630-bcb8-0b3466d8710a) 23 | -------------------------------------------------------------------------------- /website/docs/docker.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | 5 | # Docker 6 | 7 | ### Images 8 | 9 | Docker builds are [automated](https://github.com/orhun/git-cliff/tree/main/.github/workflows/docker.yml) and images are available in the following registries: 10 | 11 | - [Docker Hub](https://hub.docker.com/r/orhunp/git-cliff) 12 | - [GitHub Container Registry](https://github.com/orhun/git-cliff/pkgs/container/git-cliff%2Fgit-cliff) 13 | 14 | ### Usage 15 | 16 | The easiest way of running **git-cliff** (in the git root directory with [configuration file](/docs/configuration) present) is to use the available tags from [Docker Hub](https://hub.docker.com/r/orhunp/git-cliff): 17 | 18 | ```bash 19 | docker run -t -v "$(pwd)":/app/ "orhunp/git-cliff:${TAG:-latest}" 20 | ``` 21 | 22 | Or you can use the image from the [GitHub Package Registry](https://github.com/orhun/git-cliff/pkgs/container/git-cliff%2Fgit-cliff): 23 | 24 | ```bash 25 | docker run -t -v "$(pwd)":/app/ "ghcr.io/orhun/git-cliff/git-cliff:${TAG:-latest}" 26 | ``` 27 | 28 | ### Building 29 | 30 | Custom Docker images can be built from the [Dockerfile](https://github.com/orhun/git-cliff/blob/main/Dockerfile): 31 | 32 | ```bash 33 | DOCKER_BUILDKIT=1 docker build -t git-cliff . 34 | ``` 35 | -------------------------------------------------------------------------------- /website/docs/github-actions/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "GitHub Actions", 3 | "position": 9, 4 | "link": { 5 | "type": "generated-index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /website/docs/github-actions/git-cliff-action.md: -------------------------------------------------------------------------------- 1 | # git-cliff-action 2 | 3 | It is possible to generate changelogs using [GitHub Actions](https://github.com/features/actions) via [git-cliff-action](https://github.com/orhun/git-cliff-action). 4 | 5 | ```yml 6 | - name: Check out repository 7 | uses: actions/checkout@v3 8 | with: 9 | fetch-depth: 0 10 | 11 | - name: Generate a changelog 12 | uses: orhun/git-cliff-action@v3 13 | with: 14 | config: cliff.toml 15 | args: --verbose 16 | env: 17 | OUTPUT: CHANGELOG.md 18 | GITHUB_REPO: ${{ github.repository }} 19 | ``` 20 | 21 | See the [repository](https://github.com/orhun/git-cliff-action) for other [examples](https://github.com/orhun/git-cliff-action#examples). 22 | 23 | Also, see the [continuous deployment workflow](https://github.com/orhun/git-cliff/tree/main/.github/workflows/cd.yml) of this project which sets the release notes for GitHub releases using this action. 24 | -------------------------------------------------------------------------------- /website/docs/github-actions/setup-git-cliff.md: -------------------------------------------------------------------------------- 1 | # setup-git-cliff 2 | 3 | There is also another GitHub Action which is [setup-git-cliff](https://github.com/kenji-miyake/setup-git-cliff). 4 | 5 | While `git-cliff-action` uses the Docker image generated by [docker.yml](https://github.com/orhun/git-cliff/blob/main/.github/workflows/docker.yml), `setup-git-cliff` installs the binary executable in the [release artifacts](https://github.com/orhun/git-cliff/releases/latest): 6 | 7 | ```yml 8 | - name: Check out repository 9 | uses: actions/checkout@v3 10 | with: 11 | fetch-depth: 0 12 | 13 | - name: Set up git-cliff 14 | uses: kenji-miyake/setup-git-cliff@v1 15 | 16 | - name: Run git-cliff 17 | run: git cliff 18 | ``` 19 | 20 | See a practical example [here](https://github.com/autowarefoundation/autoware-github-actions/blob/v1/generate-changelog/action.yaml). 21 | -------------------------------------------------------------------------------- /website/docs/github-actions/taiki-e-install-action.md: -------------------------------------------------------------------------------- 1 | # taiki-e/install-action 2 | 3 | [taiki-e/install-action](https://github.com/taiki-e/install-action) enables a manual workflow 4 | where `git-cliff` is automatically installed into your GitHub Actions environment from pre-built releases 5 | and you can invoke it in subsequent shell script steps. 6 | 7 | For example: 8 | 9 | ```yml 10 | - name: Check out repository 11 | uses: actions/checkout@v3 12 | with: 13 | fetch-depth: 0 14 | 15 | - name: Install git-cliff 16 | uses: taiki-e/install-action@git-cliff 17 | 18 | - name: Generate changelog 19 | run: git-cliff 20 | ``` 21 | -------------------------------------------------------------------------------- /website/docs/gitlab.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 10 3 | --- 4 | 5 | # GitLab CI/CD 6 | 7 | It is possible to generate changelogs using [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). 8 | 9 | This minimal example creates artifacts that can be used on another job. 10 | 11 | ```yml 12 | - changelog: 13 | image: 14 | name: orhunp/git-cliff:latest 15 | entrypoint: [""] 16 | variables: 17 | GIT_STRATEGY: clone # clone entire repo instead of reusing workspace 18 | GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs 19 | stage: doc 20 | script: 21 | - git-cliff -r . > CHANGELOG.md 22 | artifacts: 23 | paths: 24 | - CHANGELOG.md 25 | ``` 26 | 27 | Please note that the stage is `doc` and has to be changed accordingly to your need. 28 | -------------------------------------------------------------------------------- /website/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Getting Started 6 | 7 | **git-cliff** can generate [changelog](https://en.wikipedia.org/wiki/Changelog) files from the [Git](https://git-scm.com/) history by utilizing [conventional commits](/docs/configuration/git#conventional_commits) as well as regex-powered [custom parsers](/docs/configuration/git#commit_parsers). 8 | 9 | The [changelog template](category/templating) can be customized with a [configuration file](configuration) to match the desired format. 10 | 11 | ## Quickstart 12 | 13 | 1. Install **git-cliff**: 14 | 15 | ```bash 16 | cargo install git-cliff 17 | ``` 18 | 19 | Also, see the other [installation options](installation). 20 | 21 | 2. Initialize **git-cliff**: 22 | 23 | ```bash 24 | git-cliff --init 25 | ``` 26 | 27 | Edit the default [configuration](configuration) (`cliff.toml`) as you like. Check out the [examples](templating/examples) for different templates. 28 | 29 | 3. Generate a changelog: 30 | 31 | ```bash 32 | git-cliff -o CHANGELOG.md 33 | ``` 34 | 35 | See the [command-line usage examples](usage/examples). 36 | 37 | :::note 38 | The `git cliff` command can also be used interchangeably with `git-cliff` (with a `-`) in most environments (when `git` is installed). However, when using the [NPM](/docs/installation/npm) installation method is used, the `git-cliff` command should be used. 39 | ::: 40 | 41 | ## Contribute 42 | 43 | Contributions are highly appreciated! See the [contribution guidelines](https://github.com/orhun/git-cliff/blob/main/CONTRIBUTING.md) for getting started. 44 | 45 | Feel free to submit issues and toss ideas! 46 | -------------------------------------------------------------------------------- /website/docs/installation/alpine-linux.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | # Alpine Linux 5 | 6 | If you are using Alpine Linux, **git-cliff** is available for [Alpine Edge](https://pkgs.alpinelinux.org/packages?name=git-cliff&branch=edge) and it can be installed via [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) (Alpine Package Keeper) after enabling the [community repository](https://wiki.alpinelinux.org/wiki/Repositories): 7 | 8 | ```bash 9 | apk add git-cliff 10 | ``` 11 | -------------------------------------------------------------------------------- /website/docs/installation/arch-linux.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | # Arch Linux 5 | 6 | If you are using Arch Linux, **git-cliff** can be installed from the [official repositories](https://archlinux.org/packages/extra/x86_64/git-cliff/): 7 | 8 | ```bash 9 | pacman -S git-cliff 10 | ``` 11 | -------------------------------------------------------------------------------- /website/docs/installation/binary-releases.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | # Binary releases 5 | 6 | See the available binaries for different operating systems/architectures from the [releases page](https://github.com/orhun/git-cliff/releases). 7 | 8 | Release tarballs are signed with the following PGP key: [1D2D410A741137EBC544826F4A92FA17B6619297](https://keyserver.ubuntu.com/pks/lookup?search=0x4A92FA17B6619297&op=vindex) 9 | 10 | ### Linux 11 | 12 | 1. Download the latest binary from [releases](https://github.com/orhun/git-cliff/releases) section and pick between [glibc](https://en.wikipedia.org/wiki/Glibc) or [musl-libc](https://musl.libc.org/) binary. 13 | 14 | 2. To download the package compiled with `glibc`: 15 | 16 | ```bash 17 | # version="1.0.0" 18 | wget "https://github.com/orhun/git-cliff/releases/download/v${version}/git-cliff-${version}-x86_64-unknown-linux-gnu.tar.gz" 19 | ``` 20 | 21 | 2. To download the package compiled with `musl-libc`: 22 | 23 | ```bash 24 | # version="1.0.0" 25 | wget "https://github.com/orhun/git-cliff/releases/download/v${version}/git-cliff-${version}-x86_64-unknown-linux-musl.tar.gz" 26 | ``` 27 | 28 | 3. Extract the files: 29 | 30 | ```bash 31 | tar -xvzf git-cliff-*.tar.gz 32 | ``` 33 | 34 | 4. Enter the folder: 35 | 36 | ```bash 37 | cd "git-cliff-${version}" 38 | ``` 39 | 40 | 5. Run the binary: 41 | 42 | ```bash 43 | ./git-cliff 44 | ``` 45 | 46 | 6. Move binary to `/usr/local/bin/` for running it from the terminal using `git-cliff` command. 47 | -------------------------------------------------------------------------------- /website/docs/installation/build-from-source.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # Build from source 6 | 7 | ### Prerequisites 8 | 9 | - [Rust](https://www.rust-lang.org/) (nightly) 10 | - The minimum supported Rust version is `1.75.0`. 11 | - [zlib](https://zlib.net/) 12 | - [libgit2](https://libgit2.org/) 13 | 14 | ### Instructions 15 | 16 | 1. Clone the repository. 17 | 18 | ```bash 19 | git clone https://github.com/orhun/git-cliff 20 | cd git-cliff/ 21 | ``` 22 | 23 | 2. Build. 24 | 25 | ```bash 26 | CARGO_TARGET_DIR=target cargo build --release 27 | ``` 28 | 29 | Binary will be located at `target/release/git-cliff`. 30 | 31 | Also, see the [available feature flags](/docs/installation/crates-io). 32 | 33 | ### Shell completions 34 | 35 | To generate completions in `target`: 36 | 37 | ```bash 38 | OUT_DIR=target target/release/git-cliff-completions 39 | ``` 40 | 41 | ### Manpage 42 | 43 | To generate a manpage in `target`: 44 | 45 | ```bash 46 | OUT_DIR=target target/release/git-cliff-mangen 47 | ``` 48 | -------------------------------------------------------------------------------- /website/docs/installation/conda-forge.md: -------------------------------------------------------------------------------- 1 | # Conda-forge 2 | 3 | You can install **git-cliff** from [conda-forge](https://anaconda.org/conda-forge/git-cliff) using [`pixi`](https://pixi.sh): 4 | 5 | ```bash 6 | pixi global install git-cliff 7 | ``` 8 | -------------------------------------------------------------------------------- /website/docs/installation/crates-io.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Crates.io 6 | 7 | **git-cliff** can be installed from [crates.io](https://crates.io/crates/git-cliff): 8 | 9 | ```bash 10 | cargo install git-cliff 11 | ``` 12 | 13 | If you want to install the latest git version: 14 | 15 | ```bash 16 | cargo install --git https://github.com/orhun/git-cliff 17 | ``` 18 | 19 | The minimum supported Rust version is `1.83.0`. 20 | 21 | Also, **git-cliff** has the following feature flags which can be enabled via `--features` argument: 22 | 23 | - `update-informer`: inform about the new releases of **git-cliff** 24 | - `github`: enables the [GitHub integration](/docs/integration/github) 25 | - `gitlab`: enables the [GitLab integration](/docs/integration/gitlab) 26 | - `bitbucket`: enables the [Bitbucket integration](/docs/integration/bitbucket) 27 | 28 | All these features are enabled as default. 29 | 30 | To install without these features: 31 | 32 | ```bash 33 | cargo install git-cliff --no-default-features 34 | ``` 35 | 36 | e.g. disable GitHub integration but enable the new version notifier: 37 | 38 | ```bash 39 | cargo install git-cliff --no-default-features --features update-informer 40 | ``` 41 | -------------------------------------------------------------------------------- /website/docs/installation/homebrew.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | # Homebrew 5 | 6 | On macOS, **git-cliff** can be installed via [Homebrew](https://formulae.brew.sh/formula/git-cliff): 7 | 8 | ```bash 9 | brew install git-cliff 10 | ``` 11 | -------------------------------------------------------------------------------- /website/docs/installation/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | # Installation 5 | 6 |
7 | Packaging status 8 | 9 | [![Packaging status](https://repology.org/badge/vertical-allrepos/git-cliff.svg)](https://repology.org/project/git-cliff/versions) 10 | 11 |
12 | -------------------------------------------------------------------------------- /website/docs/installation/macports.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | # MacPorts 5 | 6 | On macOS, **git-cliff** can be installed via [MacPorts](https://www.macports.org): 7 | 8 | ```bash 9 | sudo port install git-cliff 10 | ``` 11 | 12 | [Port page](https://ports.macports.org/port/git-cliff/) 13 | -------------------------------------------------------------------------------- /website/docs/installation/npm.md: -------------------------------------------------------------------------------- 1 | # NPM 2 | 3 | You can install and run **git-cliff** from [NPM](https://www.npmjs.com/package/git-cliff) with a single command: 4 | 5 | ```bash 6 | npx git-cliff@latest 7 | ``` 8 | 9 | Also, if you want to add **git-cliff** to your project: 10 | 11 | ```bash 12 | # with yarn 13 | yarn add -D git-cliff 14 | 15 | # with npm 16 | npm install git-cliff --save-dev 17 | ``` 18 | 19 | Afterwards, you can run **git-cliff** via `npm exec git-cliff` or `npx git-cliff@latest`. 20 | 21 | ## Programmatic API 22 | 23 | **git-cliff** also provides a fully typed programmatic API. You can use it to integrate **git-cliff** into your own tooling. 24 | 25 | ```typescript 26 | import { runGitCliff, type Options } from "git-cliff"; 27 | 28 | const options: Options = { 29 | // ... 30 | }; 31 | 32 | runGitCliff(options); 33 | ``` 34 | 35 | Under the hood this will parse the options, set up the environment and call the **git-cliff** binary for you. 36 | 37 | ## Supported Node.js Versions 38 | 39 | The following minimum versions of Node are currently supported: 40 | 41 | - `>=18.19` 42 | - `>=20.6` 43 | - `>=21` 44 | 45 | ## Supported Platforms 46 | 47 | NPM packages are distributed for the following platforms: 48 | 49 | - Linux (x64, arm64) 50 | - Windows (x64, arm64) 51 | - macOS (x64, arm64) 52 | -------------------------------------------------------------------------------- /website/docs/installation/pypi.md: -------------------------------------------------------------------------------- 1 | # PyPI 2 | 3 | If you are a Python user, you can install and run **git-cliff** from [PyPI](https://pypi.org/project/git-cliff/) using `pip`: 4 | 5 | ```bash 6 | pip install git-cliff 7 | ``` 8 | -------------------------------------------------------------------------------- /website/docs/installation/winget.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | # WinGet 5 | 6 | On Windows, **git-cliff** can be installed via [WinGet](https://winstall.app/apps/orhun.git-cliff/): 7 | 8 | ```shell 9 | winget install git-cliff 10 | ``` 11 | -------------------------------------------------------------------------------- /website/docs/integration/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Integration", 3 | "position": 7, 4 | "link": { 5 | "type": "generated-index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /website/docs/integration/python.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # Python 🐍 6 | 7 | For Python projects, **git-cliff** can be configured in `pyproject.toml` via the [tool table](https://peps.python.org/pep-0518/#tool-table). To do this, simply replace the available configuration sections with `[tool.git-cliff.
]` and place them inside `pyproject.toml`. For example: 8 | 9 | ```toml 10 | name = "..." 11 | 12 | [project] 13 | dependencies = [] 14 | 15 | [tool.git-cliff.changelog] 16 | header = "All notable changes to this project will be documented in this file." 17 | body = "..." 18 | footer = "" 19 | # see [changelog] section for more keys 20 | 21 | [tool.git-cliff.git] 22 | conventional_commits = true 23 | commit_parsers = [] 24 | filter_commits = false 25 | # see [git] section for more keys 26 | ``` 27 | -------------------------------------------------------------------------------- /website/docs/integration/rust.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # Rust/Cargo 🦀 6 | 7 | For Rust projects, **git-cliff** can be configured in `Cargo.toml` via [metadata table](https://doc.rust-lang.org/cargo/reference/manifest.html#the-metadata-table). To do this, simply replace the available configuration sections with `[package.metadata.git-cliff.
]` and place them inside `Cargo.toml`. For example: 8 | 9 | ```toml 10 | [package] 11 | name = "..." 12 | 13 | [dependencies] 14 | # ... 15 | 16 | [package.metadata.git-cliff.changelog] 17 | header = "All notable changes to this project will be documented in this file." 18 | body = "..." 19 | footer = "" 20 | # see [changelog] section for more keys 21 | 22 | [package.metadata.git-cliff.git] 23 | conventional_commits = true 24 | commit_parsers = [] 25 | filter_commits = false 26 | # see [git] section for more keys 27 | ``` 28 | 29 | For Cargo workspaces, [`workspace.metadata`](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspacemetadata-table) table can be used. (e.g. `[workspace.metadata.git-cliff.
]`) 30 | -------------------------------------------------------------------------------- /website/docs/sourcehut.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 11 3 | --- 4 | 5 | # Sourcehut Builds 6 | 7 | It is possible to generate changelogs using [SourceHut builds](https://builds.sr.ht). 8 | 9 | ```yaml 10 | image: alpine/edge 11 | packages: 12 | - git-cliff 13 | secrets: 14 | - 15 | sources: 16 | - git://git@git.sr.ht:~/ 17 | environment: 18 | dir: 19 | source: 20 | tasks: 21 | - git-cliff: | 22 | cd $dir 23 | git cliff -o CHANGELOG.md 24 | ssh-keyscan -t rsa git.sr.ht >> ~/.ssh/known_hosts 25 | git remote set-url origin $source 26 | git checkout main 27 | git add CHANGELOG.md 28 | git commit -m "chore(release): Update CHANGELOG" 29 | git push -o skip-ci 30 | ``` 31 | 32 | 1. Generate a new SSH-key for SourceHut builds: 33 | `ssh-keygen -t ed25519 -C "builds.sr.ht" -f ~/.ssh/builds-srht` 34 | 2. Add the newly generated public key to your 35 | [SourceHut account](https://meta.sr.ht/keys). 36 | 3. Add the private key as a secret to your 37 | [Sourcehut Builds](https://builds.sr.ht/secrets). 38 | 4. Replace all the placeholders in your `.build.yml`: 39 | - `` 40 | - `` 41 | - `` 42 | - `` 43 | -------------------------------------------------------------------------------- /website/docs/templating/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Templating", 3 | "position": 5, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "A template is a text where variables and expressions get replaced with values when it is rendered." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /website/docs/templating/syntax.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | # Syntax 5 | 6 | **git-cliff** uses [Tera](https://github.com/Keats/tera) as the template engine. It has a syntax based on [Jinja2](http://jinja.pocoo.org/) and [Django](https://docs.djangoproject.com/en/3.1/topics/templates/) templates. 7 | 8 | There are 3 kinds of delimiters and those cannot be changed: 9 | 10 | 11 | 12 | - `{{` and `}}` for expressions 13 | - `{%` or `{%-` and `%}` or `-%}` for statements 14 | - `{#` and `#}` for comments 15 | 16 | 17 | 18 | See the [Tera Documentation](https://keats.github.io/tera/docs/#templates) for more information about [control structures](https://keats.github.io/tera/docs/#control-structures), [built-ins filters](https://keats.github.io/tera/docs/#built-ins), etc. 19 | 20 | Custom built-in filters that **git-cliff** uses: 21 | 22 | - `upper_first`: Converts the first character of a string to uppercase. 23 | -------------------------------------------------------------------------------- /website/docs/usage/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Usage", 3 | "position": 3, 4 | "link": { 5 | "type": "generated-index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /website/docs/usage/adding-commits.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | --- 4 | 5 | # Adding custom commits 6 | 7 | In some cases, you might want to include commit messages in the changelog that yet don't exist. One example would be having "the commit message that updates the changelog" in the changelog. (🤔) 8 | 9 | ```bash 10 | git cliff -o CHANGELOG.md 11 | git add CHANGELOG.md 12 | git commit -m "chore(release): update CHANGELOG.md for 1.0.0" 13 | ``` 14 | 15 | In the example above, `CHANGELOG.md` will not have the latest commit message since the commit is created afterward. So if you want to include custom commit messages like that in the changelog, you can use the `--with-commit` argument as follows: 16 | 17 | ```bash 18 | # define the commit message 19 | commit_msg="chore(release): update CHANGELOG.md for 1.0.0" 20 | 21 | # generate changelog and pretend a commit exists as "$commit_msg" 22 | git cliff --with-commit "$commit_msg" -o CHANGELOG.md 23 | 24 | # create the actual commit 25 | git add CHANGELOG.md 26 | git commit -m "$commit_msg" 27 | ``` 28 | 29 | The commit SHA will be empty as default when `--with-commit` is used. Specify the hash with a message separated by single whitespace for setting the commit SHA. e.g. `--with-commit "8f55e69eba6e6ce811ace32bd84cc82215673cb6 feat: add X"` 30 | 31 | :::info 32 | 33 | Adding custom commits without a SHA will affect the [`commit_range`](/docs/templating/context) template variable. 34 | 35 | ::: 36 | -------------------------------------------------------------------------------- /website/docs/usage/adding-tag-messages.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 10 3 | --- 4 | 5 | # Adding version (tag) message 6 | 7 | Sometimes, you might want to include a special message or note related to a version of your project. 8 | This can be used to highlight significant milestones, provide additional context, or share information not captured by individual commit messages. 9 | 10 | There are currently 2 ways of doing this, in both ways, the message is available in the context of the template under the name `message`: 11 | 12 | ``` 13 | {% if message %} 14 | {{ message }} 15 | {% endif %}\ 16 | ``` 17 | 18 | ## Using annotated tags 19 | 20 | The recommended way of adding a version message is to add the message to the tag: 21 | 22 | ```bash 23 | git tag v1.0.0 -m "first release, yay!" 24 | ``` 25 | 26 | So in the release's context, `message` will be "first release, yay!" (even if it is signed). 27 | 28 | ## Using `--with-tag-message` 29 | 30 | If for some reason you don't want to have the message in the tag (or don't have a tag yet) but want to include it in the generated changelog, you can use the `--with-tag-message` flag: 31 | 32 | ```bash 33 | git cliff --bump --unreleased --with-tag-message "some text" 34 | ``` 35 | 36 | In this case, you can only add a message to the latest release. 37 | 38 | :::note 39 | 40 | Please note that if you use `--with-tag-message` on a version it will ignore the original tag's message and use the one from the argument. 41 | 42 | ::: 43 | -------------------------------------------------------------------------------- /website/docs/usage/jujutsu.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 13 3 | --- 4 | 5 | # Jujutsu 6 | 7 | You can use with a repository that has been cloned using [jujutsu](https://jj-vcs.github.io/jj/latest/). 8 | 9 | ## Colocated 10 | 11 | If the repository was cloned by `jujutsu` using the `--colocate` option, then all you need to do is make sure that 12 | you have checked out your mainline branch using git. 13 | If you don't, then you will likely see an error about an unborn branch. 14 | 15 | ## Non-colocated 16 | 17 | If the repository was cloned by `jujutsu` but _not_ using the `--colocate` option, 18 | then the Git repository, normally the `.git` directory, is located in `.jj/repo/store/git` 19 | 20 | Create a file in the root of your repository that tells Git, and `git-cliff` where the Git repository is 21 | and update the `HEAD` to point to your main remote branch: 22 | 23 | e.g.: 24 | 25 | ```bash 26 | jj git clone https://github.com/orhun/menyoki 27 | cd menyoki 28 | echo "gitdir: .jj/repo/store/git" > .git 29 | echo "ref: refs/remotes/origin/master" > .jj/repo/store/git/HEAD 30 | ``` 31 | 32 | N.B.: Replace `master` in the last command with the name of your main remote branch. e.g. `main`, `trunk`, etc. 33 | -------------------------------------------------------------------------------- /website/docs/usage/load-context.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 12 3 | --- 4 | 5 | # Load context 6 | 7 | :::tip 8 | 9 | This is useful if you want to [print context](/docs/usage/print-context), modify it with an external tool and then "pipe" it back into **git-cliff**. 10 | 11 | ::: 12 | 13 | To load a context from a file and output the generated changelog: 14 | 15 | ```bash 16 | # create a context 17 | git cliff --context -o context.json 18 | 19 | # process context and generate a changelog 20 | git cliff --from-context context.json 21 | 22 | # process context loaded from stdin 23 | git cliff --from-context - 24 | ``` 25 | 26 | Free-form metadata can be added to release objects and commit objects in the context using the `extra` field: 27 | 28 | ```json 29 | { 30 | "id": "5061081d6272b1da2146fab49d803c193db309d9", 31 | "message": "commit message", 32 | "extra": { 33 | "note": "this is some arbitrary data" 34 | } 35 | } 36 | ``` 37 | -------------------------------------------------------------------------------- /website/docs/usage/monorepos.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # Monorepos 6 | 7 | You can generate a changelog scoped to a specific directory by just switching to that directory: 8 | 9 | ```bash 10 | cd packages/some_library 11 | git cliff 12 | ``` 13 | 14 | To include/exclude specific paths, use the `--include-path` and `--exclude-path` arguments: 15 | 16 | ```bash 17 | cd packages/some_library 18 | git cliff --include-path "packages/some_library/**/*" --exclude-path ".github/*" 19 | ``` 20 | 21 | These paths must be relative to the repository's root and should be a valid glob pattern. 22 | -------------------------------------------------------------------------------- /website/docs/usage/multiple-repos.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # Multiple repositories 6 | 7 | To generate a changelog for multiple git repositories: 8 | 9 | ```bash 10 | git cliff --repository path1 path2 11 | ``` 12 | 13 | Note that the changelog will be generated using the merged history of the given repositories. 14 | 15 | :::tip 16 | 17 | You can use the `{{ repository }}` variable in the template to display which release belongs to which repository. 18 | 19 | See [context](/docs/templating/context) for more information. 20 | 21 | ::: 22 | -------------------------------------------------------------------------------- /website/docs/usage/print-context.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 11 3 | --- 4 | 5 | # Print context 6 | 7 | To print the changelog [context](/docs/templating/context) as JSON: 8 | 9 | ```bash 10 | # print context to stdout 11 | git cliff --context 12 | 13 | # save context to a file 14 | git cliff --context --output context.json 15 | ``` 16 | -------------------------------------------------------------------------------- /website/docs/usage/skipping-commits.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | --- 4 | 5 | # Skipping commits 6 | 7 | You can use `--skip-commit` argument to skip specific commits by their SHA1 value: 8 | 9 | ```bash 10 | git cliff --skip-commit a78bc368e9ee382a3016c0c4bab41f7de4503bcd 11 | ``` 12 | 13 | If you have multiple commits to skip, you can either use this argument multiple times or create `.cliffignore` at the root of your repository. 14 | 15 | For example: 16 | 17 | ```bash 18 | # contents of .cliffignore 19 | 20 | 4f88dda8c746173ea59f920b7579b7f6c74bd6c8 21 | 10c3194381f2cc4f93eb97404369568882ed8677 22 | ``` 23 | -------------------------------------------------------------------------------- /website/docs/usage/submodules.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # Submodules 6 | 7 | If [`recurse_submodules`](/docs/configuration/git#recurse_submodules) is set to `true`, you can include submodule commits into your changelog. 8 | 9 | For example: 10 | 11 | ```toml 12 | [git] 13 | recurse_submodules = true 14 | 15 | [changelog] 16 | body = """ 17 | {% for submodule_path, commits in submodule_commits %} 18 | ### {{ submodule_path | upper_first }} 19 | {% for group, commits in commits | group_by(attribute="group") %} 20 | #### {{ group | upper_first }} 21 | {% for commit in commits %} 22 | - {{ commit.message | upper_first }}\ 23 | {% endfor %} 24 | {% endfor %} 25 | {% endfor %}\n 26 | """ 27 | ``` 28 | 29 | :::info 30 | 31 | If a release does not contain any submodule updates, `submodule_commits` is just an empty map. 32 | 33 | ::: 34 | -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "git-cliff-website", 3 | "version": "0.0.0", 4 | "license": "MIT OR Apache-2.0", 5 | "private": true, 6 | "scripts": { 7 | "docusaurus": "docusaurus", 8 | "start": "docusaurus start", 9 | "build": "docusaurus build", 10 | "swizzle": "docusaurus swizzle", 11 | "deploy": "docusaurus deploy", 12 | "clear": "docusaurus clear", 13 | "serve": "docusaurus serve", 14 | "write-translations": "docusaurus write-translations", 15 | "write-heading-ids": "docusaurus write-heading-ids", 16 | "typecheck": "tsc" 17 | }, 18 | "dependencies": { 19 | "@docusaurus/core": "^3.7.0", 20 | "@docusaurus/preset-classic": "^3.7.0", 21 | "@easyops-cn/docusaurus-search-local": "^0.49.2", 22 | "@mdx-js/react": "^3.1.0", 23 | "clsx": "^2.1.1", 24 | "prism-react-renderer": "^2.4.1", 25 | "react": "^18.3.1", 26 | "react-dom": "^18.3.1" 27 | }, 28 | "devDependencies": { 29 | "@docusaurus/module-type-aliases": "^3.4.0", 30 | "@docusaurus/tsconfig": "^3.7.0", 31 | "typescript": "^5.8.3" 32 | }, 33 | "browserslist": { 34 | "production": [ 35 | ">0.5%", 36 | "not dead", 37 | "not op_mini all" 38 | ], 39 | "development": [ 40 | "last 1 chrome version", 41 | "last 1 firefox version", 42 | "last 1 safari version" 43 | ] 44 | }, 45 | "engines": { 46 | "node": ">=18.0" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /website/sidebars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Creating a sidebar enables you to: 3 | - create an ordered group of docs 4 | - render a sidebar for each doc of that group 5 | - provide next/previous navigation 6 | 7 | The sidebars can be generated from the filesystem, or explicitly defined here. 8 | 9 | Create as many sidebars as you want. 10 | */ 11 | 12 | // @ts-check 13 | 14 | /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ 15 | const sidebars = { 16 | // By default, Docusaurus generates a sidebar from the docs folder structure 17 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], 18 | 19 | // But you can create a sidebar manually 20 | /* 21 | tutorialSidebar: [ 22 | 'intro', 23 | 'hello', 24 | { 25 | type: 'category', 26 | label: 'Tutorial', 27 | items: ['tutorial-basics/create-a-document'], 28 | }, 29 | ], 30 | */ 31 | }; 32 | 33 | module.exports = sidebars; 34 | -------------------------------------------------------------------------------- /website/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding-top: 2rem; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | 13 | .text { 14 | font-family: "A Angkanya Sebelas"; 15 | font-size: 1.5em; 16 | } 17 | -------------------------------------------------------------------------------- /website/src/components/Testimonials/styles.module.css: -------------------------------------------------------------------------------- 1 | .testimonialsList { 2 | display: flex; 3 | flex-direction: column; 4 | gap: 0.5rem; 5 | margin: 1rem auto; 6 | max-width: 600px; 7 | padding: 0 1rem; 8 | } 9 | 10 | .testimonial { 11 | line-height: 1.4; 12 | padding: 0.5rem 0; 13 | text-align: center; 14 | font-size: 1.1rem; 15 | } 16 | 17 | .content { 18 | margin: 0; 19 | font-style: italic; 20 | } 21 | 22 | .details { 23 | display: flex; 24 | flex-direction: column; 25 | align-items: flex-end; 26 | margin-top: 0.8rem; 27 | font-size: 1rem; 28 | } 29 | -------------------------------------------------------------------------------- /website/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | @font-face { 7 | font-family: "A Angkanya Sebelas"; 8 | src: url("/static/fonts/aAngkanyaSebelas.ttf") format("truetype"); 9 | } 10 | 11 | @keyframes intro { 12 | 0% { 13 | opacity: 0; 14 | } 15 | 16 | 100% { 17 | opacity: 1; 18 | } 19 | } 20 | 21 | .heroBanner { 22 | padding: 1rem 2rem; 23 | text-align: center; 24 | position: relative; 25 | overflow: hidden; 26 | background-color: #c5cdd0; 27 | color: #1c2c2e; 28 | } 29 | 30 | @media screen and (max-width: 996px) { 31 | .heroBanner { 32 | padding: 2rem; 33 | } 34 | } 35 | 36 | .buttons { 37 | display: flex; 38 | align-items: center; 39 | justify-content: center; 40 | padding-bottom: 10px; 41 | } 42 | 43 | .bodyContainer { 44 | animation: intro 1s both; 45 | animation-delay: 0.15s; 46 | } 47 | 48 | .animContainer { 49 | padding: 20px; 50 | } 51 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /website/static/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /website/static/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /website/static/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /website/static/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /website/static/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/favicon/favicon.ico -------------------------------------------------------------------------------- /website/static/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /website/static/fonts/aAngkanyaSebelas.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/fonts/aAngkanyaSebelas.ttf -------------------------------------------------------------------------------- /website/static/img/10k-giveaway.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/10k-giveaway.jpg -------------------------------------------------------------------------------- /website/static/img/git-cliff-anim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff-anim.gif -------------------------------------------------------------------------------- /website/static/img/git-cliff-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff-banner.jpg -------------------------------------------------------------------------------- /website/static/img/git-cliff-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff-logo.png -------------------------------------------------------------------------------- /website/static/img/git-cliff-social-card.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff-social-card.jpg -------------------------------------------------------------------------------- /website/static/img/git-cliff-star-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff-star-history.png -------------------------------------------------------------------------------- /website/static/img/git-cliff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/git-cliff.png -------------------------------------------------------------------------------- /website/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/logo.png -------------------------------------------------------------------------------- /website/static/img/rustlab2023.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/rustlab2023.png -------------------------------------------------------------------------------- /website/static/img/tee-ash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/tee-ash.jpg -------------------------------------------------------------------------------- /website/static/img/tee-black.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/tee-black.jpg -------------------------------------------------------------------------------- /website/static/img/tee-dark-heather.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/tee-dark-heather.jpg -------------------------------------------------------------------------------- /website/static/img/tee-sport-grey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/tee-sport-grey.jpg -------------------------------------------------------------------------------- /website/static/img/tee-white.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orhun/git-cliff/63ce18bfd4ead125804a55c04b474053dda80317/website/static/img/tee-white.jpg -------------------------------------------------------------------------------- /website/static/issues/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | Redirecting... 11 | 46 | 47 | 48 |
49 |

Redirecting...

50 |

If you are not redirected automatically, click the button below:

51 | Click here to redirect ⛰ 54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@docusaurus/tsconfig", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | } 7 | } 8 | --------------------------------------------------------------------------------