Ensure EXPIRY_DAYS is an integer from env variable
Some checks failed
/ chores (push) Failing after 16s

Casting `CHORES_EXPIRY_DAYS` environment variable to int ensures that
the expiry days value is correctly interpreted for use throughout the
application without type errors. This small but critical change
guarantees consistent behavior when dealing with time-based logic. No
issue reference provided.
This commit is contained in:
Kumi 2024-02-18 13:19:03 +01:00
parent 1d8f8c63df
commit 619d7e9fef
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -18,7 +18,7 @@ except KeyError:
ASSIGNEES = os.environ.get("CHORES_ASSIGNEES", "").split()
REPO_OWNER = os.environ.get("CHORES_REPO_OWNER", "PrivateCoffee")
REPO_NAME = os.environ.get("CHORES_REPO_NAME", "chores")
EXPIRY_DAYS = os.environ.get("CHORES_EXPIRY_DAYS", 2)
EXPIRY_DAYS = int(os.environ.get("CHORES_EXPIRY_DAYS", 2))
CHORES = os.environ.get(
"CHORES_TEXT", "Looks like you forgot to set the CHORES_TEXT environment variable."
)