Fix delete_outdated_docs.py to get the correct api key (#7242)

This commit is contained in:
Silvano Cerza 2024-02-28 12:52:13 +01:00 committed by GitHub
parent 61eb143905
commit 2fea67d4a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,9 +12,9 @@ VERSION_VALIDATOR = re.compile(r"^[0-9]+\.[0-9]+$")
def readme_token():
api_key = os.getenv("RDME_API_KEY", None)
api_key = os.getenv("README_API_KEY", None)
if not api_key:
raise Exception("RDME_API_KEY env var is not set")
raise Exception("README_API_KEY env var is not set")
api_key = f"{api_key}:"
return base64.b64encode(api_key.encode("utf-8")).decode("utf-8")