commitizen
commitizen copied to clipboard
refactor(changelog): simplify logic for get_oldest_and_newest_rev
Description
- Refactor
get_oldest_and_newest_rev - Since we only use the latest element of the result of
get_smart_range, I believe we can replace it with a simpler function. - The implementation of the function
get_next_tag_name_after_versionis based on an assumption that "all GitTags are unique". If the oldest tag's name is the inputversion, then it returnsNone. The behavior aligns with "ReturnNoneforoldest_revif the oldest tag is the last tag in the list and matches the requested oldest tag"
Checklist
- [ ] I have read the contributing guidelines
Code Changes
- [ ] Add test cases to all the changes you introduce
- [ ] Run
poetry alllocally to ensure this change passes linter check and tests - [ ] Manually test the changes:
- [ ] Verify the feature/bug fix works as expected in real-world scenarios
- [ ] Test edge cases and error conditions
- [ ] Ensure backward compatibility is maintained
- [ ] Document any manual testing steps performed
- [ ] Update the documentation for the changes
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:warning: Please upload report for BASE (v4-9-0-test@b313847). Learn more about missing BASE report.
Additional details and impacted files
@@ Coverage Diff @@
## v4-9-0-test #1539 +/- ##
==============================================
Coverage ? 98.31%
==============================================
Files ? 58
Lines ? 2669
Branches ? 0
==============================================
Hits ? 2624
Misses ? 45
Partials ? 0
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 98.31% <100.00%> (?) |
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.