fix(remote): handle empty ref_name in contributor detection with --latest#1454
fix(remote): handle empty ref_name in contributor detection with --latest#1454joaquinhuigomez wants to merge 3 commits intoorhun:mainfrom
Conversation
…test When using --latest or custom commit ranges ending with "..", the ref_name passed to the remote API could be an empty string, causing the API to return incomplete results. This made all contributors appear as first-time. Treat empty ref_name the same as HEAD (fetch all commits) to ensure full commit history is available for first-time contributor detection. Also adds regression tests for tagged release scenarios where contributors have historical commits, and a test fixture for --latest with GitHub integration. Closes orhun#1096
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1454 +/- ##
==========================================
+ Coverage 47.45% 47.64% +0.20%
==========================================
Files 24 24
Lines 2131 2135 +4
==========================================
+ Hits 1011 1017 +6
+ Misses 1120 1118 -2
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:
|
ognis1205
left a comment
There was a problem hiding this comment.
Thanks for the PR! Before moving forward, please make sure the following points are resolved:
- Formatting (
cargo +nightly fmt --all) - Linting (
cargo clippy --tests --verbose -- -D warnings) - Configure shell script permissions properly (
fixtures/test-github-integration-latest/commit.shmust have executable permission)
|
Fixed formatting, clippy is clean, and commit.sh now has executable permission. |
orhun
left a comment
There was a problem hiding this comment.
I just checked locally and the test fixture seems to be failing. Can you check it?
| - fixtures-name: test-github-integration | ||
| - fixtures-name: test-github-integration-custom-range | ||
| command: v1.0.0..v1.0.1 | ||
| - fixtures-name: test-github-integration-latest |
There was a problem hiding this comment.
nit: rename to follow the same format with other fixtures:
| - fixtures-name: test-github-integration-latest | |
| - fixtures-name: test-github-integration-latest-arg |
Description
When using
--latestor commit ranges ending with.., an emptyref_namegets passed to the remote API. This returns incomplete results and makes all contributors appear as first-time.Treats empty
ref_namethe same asHEADso the full commit history is available for the contributor check. Also adds debug logging whenrelease_commit_timestampcan't be resolved.Motivation and Context
Fixes #1096. The core timestamp-filtering bug was addressed in #1348; this covers the remaining edge case with empty
ref_name.Tests
--latestwith GitHub integration