Skip to content

Commit b76fd7d

Browse files
committed
only print the top 10 authors, including scores less than 0
1 parent 29e2325 commit b76fd7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ var rootCmd = &cobra.Command{
125125
fmt.Fprintf(w, "Rank\tEmail\tName\tScore\tImpact\tCommits\n")
126126
for rank, authorEmail := range authorEmails {
127127
agg := authors[authorEmail]
128-
// ignore scores less than 0
129-
if agg.score < 1 {
130-
continue
128+
// only print the top 10
129+
if rank > 9 {
130+
break
131131
}
132132
fmt.Fprintf(w, "%d\t%s\t%s\t%d\t%d\t%d\n", rank+1, authorEmail, agg.name, int(math.Round(agg.score)), agg.impact, agg.commits)
133133
}

0 commit comments

Comments
 (0)