git-cliff icon indicating copy to clipboard operation
git-cliff copied to clipboard

docs: update examples and tips on commit statistics

Open ognis1205 opened this issue 6 months ago • 3 comments

Description

This PR updates the example templates and adds a new tips & tricks section showcasing how to use statistics in git-cliff templates. It demonstrates how to include commit counts, durations, issue references, and other metrics in the generated changelog. Closes #1160

Motivation and Context

The usage of the statistics object is currently under-documented, which may prevent users from utilizing it effectively in their templates. This PR addresses that gap by adding practical examples and tips to help users take advantage of the available data in a meaningful way.

How Has This Been Tested?

N/A

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)
  • [x] Documentation (no code change)
  • [ ] Refactor (refactoring production code)
  • [ ] Other

Checklist:

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

ognis1205 avatar Jun 04 '25 00:06 ognis1205

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 43.05%. Comparing base (05a50d7) to head (f97d371). Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1162   +/-   ##
=======================================
  Coverage   43.05%   43.05%           
=======================================
  Files          22       22           
  Lines        2056     2056           
=======================================
  Hits          885      885           
  Misses       1171     1171           
Flag Coverage Δ
unit-tests 43.05% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Jun 04 '25 00:06 codecov-commenter

@orhun

Thanks for the review! I’ll make the changes as per your suggestions and ping you again once they’re ready.

ognis1205 avatar Jun 05 '25 12:06 ognis1205

Hey @orhun,

I’ve addressed all the points that were raised in the review. Let me know if there’s anything else you’d like me to revise or clarify. Also, please review #1151 together with this one when you have a chance.

Thanks!

ognis1205 avatar Jun 13 '25 07:06 ognis1205

This is blocked by #1151

orhun avatar Jun 16 '25 19:06 orhun

Looking good, is the template up-to-date with the main branch now?

orhun avatar Jun 27 '25 19:06 orhun

Looking good, is the template up-to-date with the main branch now?

Yes, I’ve been updating the template in parallel with the logic implementation, so it’s up-to-date with the main branch.

ognis1205 avatar Jun 27 '25 20:06 ognis1205

@orhun

I’ve addressed the changes suggested by in the review.

ognis1205 avatar Jun 27 '25 20:06 ognis1205