Skip to content

fix(scoring): unique_repos_contributed_to undercounts when mirror fil…#1625

Open
lourincedaging0-commits wants to merge 2 commits into
entrius:testfrom
lourincedaging0-commits:fix/unique-repos-contributed-to-mirror-fetch-1616
Open

fix(scoring): unique_repos_contributed_to undercounts when mirror fil…#1625
lourincedaging0-commits wants to merge 2 commits into
entrius:testfrom
lourincedaging0-commits:fix/unique-repos-contributed-to-mirror-fetch-1616

Conversation

@lourincedaging0-commits

Copy link
Copy Markdown

…e-fetch is pending/fails

score_pr() only added a MERGED PR's repo to unique_repos_contributed_to at the very end of the function, after three earlier return paths that fire whenever the mirror's file-diff data isn't available yet (scoring_data_stored=False, a MirrorRequestError, or an empty files result). Since a merged PR is already counted toward total_merged_prs independent of file-fetch status, this let repo attribution silently depend on this round's file-fetch timing instead of the PR itself.

Move the attribution earlier, right after the repo_config lookup, so a pending/failed mirror fetch no longer drops the PR's repo from unique_repos_contributed_to.

Fixes #1616

…e-fetch is pending/fails

score_pr() only added a MERGED PR's repo to unique_repos_contributed_to
at the very end of the function, after three earlier return paths that
fire whenever the mirror's file-diff data isn't available yet
(scoring_data_stored=False, a MirrorRequestError, or an empty files
result). Since a merged PR is already counted toward total_merged_prs
independent of file-fetch status, this let repo attribution silently
depend on this round's file-fetch timing instead of the PR itself.

Move the attribution earlier, right after the repo_config lookup, so a
pending/failed mirror fetch no longer drops the PR's repo from
unique_repos_contributed_to.

Fixes entrius#1616
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(scoring): unique_repos_contributed_to undercounts when mirror file-fetch is pending/fails for a MERGED PR

1 participant