fame.py: order contributors deterministically, drop the push trigger

The workflow no longer runs on pushes to FAME.md.  The "Lines" column is
blame of the current checkout and master sees dozens of commits a week, so
merging one of these pull requests immediately produced the next one:
#10008 was merged at 10:26:09 and #10009 opened 37 seconds later.  Both
files are written by the same run and cannot drift apart, so the weekly run
plus manual dispatch is enough.

git-fame also leaves people with the same commit count in its own order,
which is stable for one checkout but not across checkouts, so tied ranks
kept shuffling and added diff noise.  Sort by commits, then surviving
lines, then name.  The next run will apply that order to FAME.md.
This commit is contained in:
Thomas Waldmann
2026-08-02 13:05:02 +02:00
parent 86364be731
commit 2a5cb4c677
2 changed files with 8 additions and 7 deletions
+4
View File
@@ -125,6 +125,10 @@ def collect():
)
fame = json.loads(out)
rows = [(name, commits, loc, files) for name, loc, commits, files, *_percentages in fame["data"]]
# git-fame leaves people with the same commit count in its own order, which
# is stable for a given checkout but not across checkouts, so equal ranks
# would shuffle from one run to the next. Break the tie ourselves.
rows.sort(key=lambda row: (-row[1], -row[2], row[0]))
return rows, fame["total"]