This is an automated email from the ASF dual-hosted git repository.

schofielaj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8956d38a388 MINOR: Sort reviewer candidates by contribution count 
(#21908)
8956d38a388 is described below

commit 8956d38a38860302c23e05215d6c883d54f19744
Author: Ming-Yen Chung <[email protected]>
AuthorDate: Tue Mar 31 23:20:02 2026 +0800

    MINOR: Sort reviewer candidates by contribution count (#21908)
    
    There can only be one Chia.
    
    Reviewer candidates were listed in git log insertion order, not by
    contribution count. Chia-Ping Tsai (2305 contributions) was showing up
    below Chia-Yi Chiu (3 contributions), and he was not happy about it.
    Just kidding, this is definitely to make it easy for committers/PMCs to
    just hit 1 and press enter.
    
    **Before:**
    ```
    Name or email (case insensitive): chia
    
    Possible matches (in order of most recent):
    [1] Chia-Yi Chiu [email protected] (3)
    [2] Chia-Ping Tsai [email protected] (2305)
    [3] Chia-Ping Tsai [email protected] (13)
    [4] Chia-Chuan Yu [email protected] (11)
    [5] Chia Chuan Yu [email protected] (10)
    ```
    
    Reviewers: Andrew Schofield <[email protected]>
---
 committer-tools/reviewers.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/committer-tools/reviewers.py b/committer-tools/reviewers.py
index 06ba4919213..92a1564848b 100755
--- a/committer-tools/reviewers.py
+++ b/committer-tools/reviewers.py
@@ -97,6 +97,8 @@ if __name__ == "__main__":
             if item[1] > 2:
                 parsed_reviewers.append((m.group("name"), m.group("email"), 
item[1]))
 
+    parsed_reviewers.sort(key=lambda x: x[2], reverse=True)
+
     selected_reviewers = []
     while True:
         if selected_reviewers:
@@ -113,7 +115,7 @@ if __name__ == "__main__":
         if not candidates:
             continue
 
-        print("\nPossible matches (in order of most recent):")
+        print("\nPossible matches (in order of most contributions):")
         for i, candidate in zip(range(10), candidates):
             print(f"[{i+1}] {candidate[0]} {candidate[1]} ({candidate[2]})")
 

Reply via email to