Skip to content

The definitive list of the best of (consumer facing) open source.

Fix logic flaw identified by autonomous review

fliptrigga13c680d060e722
diff --git a/core/source/maintenance/stats_updator.py b/core/source/maintenance/stats_updator.py
index f3c6f6f..0ddebdf 100644
--- a/core/source/maintenance/stats_updator.py
+++ b/core/source/maintenance/stats_updator.py
@@ -9,6 +9,10 @@ with open("data/dynamic/applications.json", "r") as f:
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
+if GITHUB_TOKEN is None:
+ print("Error: GITHUB_TOKEN environment variable is not set.")
+ exit(1)
+
headers = {
"Authorization": f"token {GITHUB_TOKEN}",
"Accept": "application/vnd.github.v3+json",
@@ -65,4 +69,4 @@ for app in data["applications"]:
with open("data/dynamic/applications.json", "w") as f:
json.dump(data, f, indent=4)
-print("Updated application data successfully!")
+print("Updated application data successfully!")
\ No newline at end of file