aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/github_utils.py
diff options
context:
space:
mode:
authorGravatar Exenifix <[email protected]>2022-12-04 13:19:08 +0300
committerGravatar GitHub <[email protected]>2022-12-04 13:19:08 +0300
commit92a9669ee06ea6341082aaceb6f2d2ad5585d007 (patch)
treef45b37e10e0e59822a795d5a9a2e0bc403501a23 /pydis_site/apps/api/github_utils.py
parentUpdate pydis_site/apps/content/resources/guides/python-guides/docker-hosting-... (diff)
parentRename vps_services.md to vps-services.md (#808) (diff)
Merge branch 'python-discord:main' into main
Diffstat (limited to 'pydis_site/apps/api/github_utils.py')
-rw-r--r--pydis_site/apps/api/github_utils.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pydis_site/apps/api/github_utils.py b/pydis_site/apps/api/github_utils.py
index 986c64e1..44c571c3 100644
--- a/pydis_site/apps/api/github_utils.py
+++ b/pydis_site/apps/api/github_utils.py
@@ -11,8 +11,6 @@ from pydis_site import settings
MAX_RUN_TIME = datetime.timedelta(minutes=10)
"""The maximum time allowed before an action is declared timed out."""
-ISO_FORMAT_STRING = "%Y-%m-%dT%H:%M:%SZ"
-"""The datetime string format GitHub uses."""
class ArtifactProcessingError(Exception):
@@ -147,7 +145,7 @@ def authorize(owner: str, repo: str) -> httpx.Client:
def check_run_status(run: WorkflowRun) -> str:
"""Check if the provided run has been completed, otherwise raise an exception."""
- created_at = datetime.datetime.strptime(run.created_at, ISO_FORMAT_STRING)
+ created_at = datetime.datetime.strptime(run.created_at, settings.GITHUB_TIMESTAMP_FORMAT)
run_time = datetime.datetime.utcnow() - created_at
if run.status != "completed":