aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/hacktoberstats.py
diff options
context:
space:
mode:
authorGravatar Hedy Li <[email protected]>2020-10-16 05:24:11 +0000
committerGravatar Hedy Li <[email protected]>2020-10-16 05:24:11 +0000
commit2e049eec4bd7d18a317c0453600045f707a3db2d (patch)
tree9b0d2fadaf7dace816f371a19ceb710a497170a4 /bot/exts/halloween/hacktoberstats.py
parentupdate calling static methods (diff)
handle no PR for a section
Diffstat (limited to 'bot/exts/halloween/hacktoberstats.py')
-rw-r--r--bot/exts/halloween/hacktoberstats.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py
index ebce9c87..6843ded2 100644
--- a/bot/exts/halloween/hacktoberstats.py
+++ b/bot/exts/halloween/hacktoberstats.py
@@ -217,13 +217,17 @@ class HacktoberStats(commands.Cog):
url="https://hacktoberfest.digitalocean.com",
icon_url="https://avatars1.githubusercontent.com/u/35706162?s=200&v=4"
)
+
+ # this will handle when no PRs in_review or accepted
+ review_str = self._build_prs_string(in_review, github_username) or "None"
+ accepted_str = self._build_prs_string(accepted, github_username) or "None"
stats_embed.add_field(
name="In Review",
- value=self._build_prs_string(in_review, github_username)
+ value=review_str
)
stats_embed.add_field(
name="Accepted",
- value=self._build_prs_string(accepted, github_username)
+ value=accepted_str
)
logging.info(f"Hacktoberfest PR built for GitHub user '{github_username}'")