mirror of
https://github.com/developersIndia/deviras.git
synced 2025-05-31 14:11:43 +05:30
Compare commits
4 Commits
2824227ac9
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
3feccf6755 | ||
|
101b529307 | ||
|
e9a454fa5a | ||
|
345dc1016e |
4
.github/workflows/aoc.yml
vendored
4
.github/workflows/aoc.yml
vendored
@@ -1,9 +1,9 @@
|
||||
name: AoC leaderboard
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# schedule:
|
||||
# Run every 24 hours at 00:00 UTC
|
||||
- cron: "0 0 * * *"
|
||||
# - cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
|
@@ -31,6 +31,10 @@ def format_leaderboard(data, num_players=100):
|
||||
for i, member_data in enumerate(sorted_members[:num_players]):
|
||||
# check for non-zero local_score
|
||||
if member_data['local_score'] > 0:
|
||||
# if member's name is null, use the member_id
|
||||
if member_data['name'] == None:
|
||||
member_data['name'] = f"Anonymous #{member_data['id']}"
|
||||
|
||||
leaderboard_stats += f"| {i + 1} | {member_data['name']} | {member_data['stars']} | {member_data['local_score']} |\n"
|
||||
|
||||
leaderboard_stats += f"\nUpdated every 24 hours"
|
||||
|
@@ -154,6 +154,7 @@ def create_community_roundup_post(
|
||||
**Community Roundup is posted on the last day of each month. To explore a compilation of all interesting posts and community threads over time, [visit our wiki](https://www.reddit.com/r/developersIndia/wiki/community-threads/).**\n
|
||||
The collection is curated by our volunteer team & is independent of the number of upvotes and comments (except for "I made This" posts). If you believe we may have overlooked any engaging posts or discussions, please share them with us via [modmail](https://reddit.com/message/compose?to=r/developersIndia&subject=Community%20Threads%20Collection%20Suggestion&message=Hey%20folks%2C%0A%0A%3Cpost%20link%3E).\n
|
||||
"""
|
||||
text = ""
|
||||
|
||||
if len(announcement_posts) > 0:
|
||||
text = "## Announcements\n|Announcements from volunteer team|\n|--------|\n"
|
||||
|
Reference in New Issue
Block a user