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

feat: add option git.require-grouped

Open Cyclonit opened this issue 8 months ago • 4 comments
trafficstars

Description

Adds a new option git.require-grouped. When this option is set to true, all commits contained within the changelog must be assigned to a group via CommitParser. If any ungrouped commit is found, an error is logged and changelog generation fails.

The check happens after running the CommitParsers. Thus it is still possible to intentionally skip commits.

Motivation and Context

Just like #1061, this option aids in enforcing contribution guidelines by preventing the use of unsupported groups or scopes.

How Has This Been Tested?

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.
  • [ ] I have formatted the code with rustfmt.
  • [ ] I checked the lints with clippy.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

Cyclonit avatar Mar 11 '25 17:03 Cyclonit

Codecov Report

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

Project coverage is 41.41%. Comparing base (bf50336) to head (e46121e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1088      +/-   ##
==========================================
- Coverage   41.42%   41.41%   -0.01%     
==========================================
  Files          21       21              
  Lines        1811     1814       +3     
==========================================
+ Hits          750      751       +1     
- Misses       1061     1063       +2     
Flag Coverage Δ
unit-tests 41.41% <100.00%> (-0.01%) :arrow_down:

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.

🚀 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.

codecov-commenter avatar Mar 11 '25 17:03 codecov-commenter

Hey @Cyclonit, what's the progress with this one? 👀 still interested in finishing the implementation?

orhun avatar Apr 20 '25 20:04 orhun

Hey @Cyclonit, what's the progress with this one? 👀 still interested in finishing the implementation?

Hi, yes definitely. Just didn't get around it. I think it is an important feature to have git-cliff serve a vital role in "corporate-level" pipelines.

Cyclonit avatar Apr 22 '25 17:04 Cyclonit

Yup, definitely agree!

orhun avatar Apr 22 '25 19:04 orhun

Still interest or any updates on this?

orhun avatar Jul 11 '25 18:07 orhun