aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/evergreen/issues.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/evergreen/issues.py')
-rw-r--r--bot/seasons/evergreen/issues.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bot/seasons/evergreen/issues.py b/bot/seasons/evergreen/issues.py
index 708f5d15..6c84ae2d 100644
--- a/bot/seasons/evergreen/issues.py
+++ b/bot/seasons/evergreen/issues.py
@@ -36,12 +36,19 @@ class Issues(commands.Cog):
if r.status in RESP_VALUE:
return await ctx.send(f"[{str(r.status)}] {RESP_VALUE.get(r.status)}")
-
+
+ # the original call is made to the issues API endpoint
+ # if a issue or PR exists then there will be something returned
+ # if the word 'issues' is present within the response then we can simply pull the data we need from the
+ # return data received from the API
if "issues" in json_data.get("html_url"):
if json_data.get("state") == "open":
iconURL = icons.get("issue")
else:
iconURL = icons.get("issue_closed")
+ # if the word 'issues' is not contained within the returned data and there is no error code then we know that
+ # the requested data is a pr, hence to get the specifics on it we have to call the PR API endpoint allowing us
+ # to get the specific information in relation to the PR that is not provided via the issues endpoint
else:
async with self.bot.http_session.get(mergeURL) as m:
if json_data.get("state") == "open":