Repository navigation
feat(examples): add GitLab built-in changelog templates - #1561
Merged
Merged
Conversation
orhun
reviewed
Jun 20, 2026
orhun
left a comment
Owner
There was a problem hiding this comment.
thank you for the PR, looks great! just have some suggestion for improving it
Comment on lines
+38
to
+39
| - [`gitlab.toml`](https://github.com/orhun/git-cliff/tree/main/examples/gitlab.toml): release notes format tailored for GitLab Releases. | ||
| - [`gitlab-detailed.toml`](https://github.com/orhun/git-cliff/tree/main/examples/gitlab-detailed.toml): detailed changelog with GitLab commit and merge request links. |
Owner
There was a problem hiding this comment.
How about we remove the detailed template and just add keepachangelog one, just to be aligned with the GitHub template as well?
i.e. let's have gitlab and gitlab-keepachangelog :)
Contributor
Author
There was a problem hiding this comment.
The applied standard really makes a lot of sense.
1 task done
JDanRibeiro
commented
Jun 21, 2026
| {% macro print_commit(commit) -%} | ||
| - {% if commit.breaking %}**BREAKING:** {% endif %}{{ commit.message | split(pat="\n") | first | upper_first | trim }} \ | ||
| ([{{ commit.id | truncate(length=7, end="") }}]({{ self::project_url() }}/-/commit/{{ commit.id }}))\ | ||
| {%- if commit.remote.pr_number %} in [!{{ commit.remote.pr_number }}]({{ self::project_url() }}/-/merge_requests/{{ commit.remote.pr_number }}){%- endif -%}\ |
Contributor
Author
There was a problem hiding this comment.
This behavior was replicated, as shown in lines 44 and 67.
#1561 (comment)
- Fix missing newline before footer in gitlab.toml (unreleased output) - Rename gitlab-detailed.toml to gitlab-keepachangelog.toml - Use ! prefix for MR references and strip (orhun#123) from commit messages - Update docs (initializing, integration, templating examples)
JDanRibeiro
force-pushed
the
feat/gitlab-example-templates
branch
from
June 25, 2026 04:51
7249193 to
9888ee5
Compare
orhun
approved these changes
Jul 11, 2026
|
Congrats on merging your first pull request! ⛰️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds two built-in GitLab changelog templates under
examples/:gitlab.toml— release notes format tailored for GitLab Releases (merge request links, contributors, tag links)gitlab-keepachangelog.toml— detailed Keep a Changelog-style format with GitLab commit and merge request linksAlso updates the documentation:
website/docs/usage/initializing.md— lists the new templates for--initand--configwebsite/docs/integration/gitlab.md— adds a "GitLab Changelog" section with usage exampleswebsite/docs/templating/examples.md— adds rendered previews for both GitLab templatesMotivation and Context
GitLab integration has been supported since v2.3.0, but there were no official built-in templates equivalent to
github.tomlandgithub-keepachangelog.toml. This makes it harder for GitLab users to get started with--init/ built-in--confignames.Closes #1560
How Has This Been Tested?
cargo build(templates are embedded viaBuiltinConfig)git cliff --init gitlabgeneratescliff.tomlfrom the new templategit cliff --config gitlab --dry-runloads the built-in templategit cliff --config gitlab-keepachangelog --dry-runloads the detailed templatecargo testpassesEnvironment: git-cliff built from source with the
gitlabfeature enabled.Screenshots / Logs (if applicable)
N/A
Types of Changes
Checklist:
cargo +nightly fmt --all— N/A (no Rust changes)cargo clippy --tests --verbose -- -D warnings— N/A (no Rust changes)cargo test