Skip to content
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

feat: add changelog modifier callback to run function #922

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

weichweich
Copy link
Contributor

Description

I added a call back function to manipulate the Changelog before it's written or the context is printed (depending how git-cliff is started).

Motivation and Context

This change is really handy to add custom logic to query information from GitLab etc. I would love to have something similar to plug-ins, but adding this call back is trivial and allows to build custom git-cliff versions that execute use-case specific, custom logic.

How Has This Been Tested?

This should be trivial. What could possibly break!? 😅

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.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 41.15%. Comparing base (82b10ac) to head (8462d82).

Files with missing lines Patch % Lines
git-cliff/src/lib.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #922      +/-   ##
==========================================
- Coverage   41.72%   41.15%   -0.57%     
==========================================
  Files          21       21              
  Lines        1678     1699      +21     
==========================================
- Hits          700      699       -1     
- Misses        978     1000      +22     
Flag Coverage Δ
unit-tests 41.15% <0.00%> (-0.57%) ⬇️

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.

@orhun
Copy link
Owner

orhun commented Nov 19, 2024

Hey, really interesting change! I'm down to add it, but maybe add some documentation or examples on how to use this from the API side.
Thanks for the PR!

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