Skip to content

Fix plain/csv ranking and add test#118

Open
NickiMash17 wants to merge 1 commit intoashkulz:masterfrom
NickiMash17:fix-output-ranking
Open

Fix plain/csv ranking and add test#118
NickiMash17 wants to merge 1 commit intoashkulz:masterfrom
NickiMash17:fix-output-ranking

Conversation

@NickiMash17
Copy link
Copy Markdown

@NickiMash17 NickiMash17 commented Apr 3, 2026

Title
Fix inaccurate ranks in plain/CSV output

Description
This PR fixes incorrect ranking when using --output plain or --output csv. Previously, these formats printed users in the GitHub search order (sorted by followers) and didn’t apply --amount, which could produce misleading ranks.

Changes:

  • Sort and trim plain/csv outputs by contribution count and respect --amount.
  • Add deterministic tie-breakers (followers, then login) to avoid rank jitter on ties.
  • Add a regression test for CSV ordering + trimming.

Files:

  • output/output.go
  • output/output_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant