Skip to content

fix(config): default to empty header and footer (#1161) #1172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Cyclonit
Copy link
Contributor

@Cyclonit Cyclonit commented Jun 10, 2025

Description

This PR removes the default values for changelog.header and changelog.footer in config/cliff.toml. This allows users to not have a header and/or footer if they so choose.

Warning: Users that don't have headers and/or footers defined in their own config but want them will have to update their config after this change has been released. They should add the following settings to return to the previous behaviour:

[changelog]
# A Tera template to be rendered as the changelog's footer.
# See https://keats.github.io/tera/docs/#introduction
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# A Tera template to be rendered as the changelog's footer.
# See https://keats.github.io/tera/docs/#introduction
footer = """
<!-- generated by git-cliff -->
"""

Note: The fixtures use different methods of newline handling in their body templates. We should investigate means of standardizing this going forward.

Motivation and Context

The changes introduced in #1087 resulted in changelog.header and changelog.footer being set to predefined templates. This resulted in #1161.

How Has This Been Tested?

Ran all fixtures.

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly. (does not apply)
  • I have formatted the code with rustfmt. (does not apply)
  • I checked the lints with clippy. (does not apply)
  • I have added tests to cover my changes. (does not apply)
  • All new and existing tests passed.

@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.95%. Comparing base (deb29dc) to head (0a5fa8e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1172   +/-   ##
=======================================
  Coverage   41.95%   41.95%           
=======================================
  Files          21       21           
  Lines        1981     1981           
=======================================
  Hits          831      831           
  Misses       1150     1150           
Flag Coverage Δ
unit-tests 41.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Cyclonit Cyclonit force-pushed the fix/1161_default_to_empty_header_and_footer branch 29 times, most recently from 86e72d3 to bc00999 Compare June 14, 2025 05:06
@Cyclonit Cyclonit force-pushed the fix/1161_default_to_empty_header_and_footer branch 5 times, most recently from 14a6869 to fa0fd12 Compare June 14, 2025 07:42
@Cyclonit Cyclonit force-pushed the fix/1161_default_to_empty_header_and_footer branch from fa0fd12 to 0a5fa8e Compare June 14, 2025 07:47
@Cyclonit Cyclonit marked this pull request as ready for review June 15, 2025 06:21
@Cyclonit Cyclonit requested a review from orhun as a code owner June 15, 2025 06:21
@orhun orhun merged commit 3e9311e into orhun:main Jun 16, 2025
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants