[workflow] fixed communtity report ranking (#2680)

pull/2686/head
Frank Lee 2 years ago committed by GitHub
parent c44fd0c867
commit 5cd8cae0c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -292,7 +292,13 @@ def generate_user_engagement_leaderboard_image(github_token: str, output_path: s
y = []
if len(total_engagement_count) > 0:
ranking = []
for name, count in total_engagement_count.items():
ranking.append((name, count))
ranking.sort(key=lambda x: x[1], reverse=True)
for name, count in ranking:
x.append(count)
y.append(name)

Loading…
Cancel
Save