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

fix(remote): preserve first time contributors

Open mcwarman opened this issue 1 year ago • 5 comments

Description

Preserve first time contributors in older change logs

Fixes #891

Motivation and Context

When a new release is created and all change logs regenerated the first time contributor section is removed.

How Has This Been Tested?

Tested using existing fixtures.

Types of Changes

  • [x] 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:

  • [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.

mcwarman avatar Oct 19 '24 10:10 mcwarman

My code follows the code style of this project.

I'm pretty very new to rust and I'm not entirely sure what I've done around date parsing is correct.

Feedback very welcome

mcwarman avatar Oct 19 '24 10:10 mcwarman

Codecov Report

Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 41.98%. Comparing base (da1cb61) to head (f592cb6). Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
git-cliff-core/src/remote/mod.rs 75.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #925      +/-   ##
==========================================
+ Coverage   41.57%   41.98%   +0.41%     
==========================================
  Files          21       21              
  Lines        1677     1694      +17     
==========================================
+ Hits          697      711      +14     
- Misses        980      983       +3     
Flag Coverage Δ
unit-tests 41.98% <88.24%> (+0.41%) :arrow_up:

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.

codecov-commenter avatar Oct 19 '24 10:10 codecov-commenter

I'll look at test coverage as well.

mcwarman avatar Oct 19 '24 10:10 mcwarman

Thanks for the PR! I will be reviewing this soon. No need to worry about test coverage or the code style for now.

Can you also update CHANGELOG.md file at the root of the repository by running git-cliff --latest with these changes? I want to see if the previously deleted first-time contributors will come back :)

orhun avatar Oct 19 '24 13:10 orhun

Updated the CHANGELOG.md, I had to run cargo run -- -o CHANGELOG.md and remove [unreleased] section manually.

--latest only returned latest tag.

mcwarman avatar Oct 19 '24 23:10 mcwarman