feat(git): support limiting processed tags#1493
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1493 +/- ##
==========================================
- Coverage 48.86% 48.67% -0.19%
==========================================
Files 26 26
Lines 2272 2281 +9
==========================================
Hits 1110 1110
- Misses 1162 1171 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
A drive-by thought from the range-endpoint work in #1489. Two ways to ship this feature, side by side: This PR's workflow. Add a branch to The range-endpoint workflow. Define fn last_n_tags(tags: &Tags, n: usize) -> CommitRange {
CommitRange {
left: tags.nth_from_end(n).map(Endpoint::StartAt),
right: tags.last().map(Endpoint::EndAt),
}
}Smaller blast radius (one transform, no new branch in the central function), and the feature stops being its own entry point and starts being one operator in a small algebra over Caveat: this is sequencing, not a blocker. If this PR lands first, the rebase is mechanical (swap the string concat for the typed transform, drop the equality branch, route through |
|
Thanks, that framing helps a lot. I kept this PR minimal against the current |
Description
Adds a
limit_tagsgit configuration option and matching--limit-tags <N>CLI flag to limit changelog generation to the latest N matched tags when no explicit range or--latest/--current/--unreleasedmode is provided.Motivation and Context
Fixes #844
How Has This Been Tested?
cargo testcargo clippy --tests --verbose -- -D warningscargo +nightly fmt --all -- --check --verbose.github/fixtures/test-fixtures-locally.sh test-limit-tagsScreenshots / Logs (if applicable)
Types of Changes
Checklist:
cargo +nightly fmt --allcargo clippy --tests --verbose -- -D warningscargo test