feat(ci-bot): order repositories by patch count
Iterating over a python dictionary can produce an arbitrary ordering. So
sort the result by patch count.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I3497eedc89d8f65eeb819d8121a2ea7c3dfb5b49
diff --git a/script/status_reporting/gerrit_patch_count.py b/script/status_reporting/gerrit_patch_count.py
index 570b671..376e728 100644
--- a/script/status_reporting/gerrit_patch_count.py
+++ b/script/status_reporting/gerrit_patch_count.py
@@ -28,7 +28,7 @@
break
message = "Patches in review:\n"
- for name, count in totals.items():
+ for name, count in sorted(totals.items(), key=lambda it: it[1], reverse=True):
message += f"* {name}: {count}\n"
return message