diff --git a/readme_generator/regen_readme_in_batch.py b/readme_generator/regen_readme_in_batch.py index 736d1e6..11207da 100644 --- a/readme_generator/regen_readme_in_batch.py +++ b/readme_generator/regen_readme_in_batch.py @@ -13,7 +13,9 @@ from pathlib import Path TOOLS_DIR = Path(__file__).resolve().parent.parent -secret = (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() +secret = ( + (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() +) login = (TOOLS_DIR / ".github_login").open("r", encoding="utf-8").read().strip() token = (TOOLS_DIR / ".github_token").open("r", encoding="utf-8").read().strip() diff --git a/readme_generator/webhook.py b/readme_generator/webhook.py index 4adcbe1..3e66875 100755 --- a/readme_generator/webhook.py +++ b/readme_generator/webhook.py @@ -15,9 +15,15 @@ TOOLS_DIR = Path(__file__).resolve().parent.parent app = Sanic(__name__) + @cache def github_webhook_secret() -> str: - return (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() + return ( + (TOOLS_DIR / ".github_webhook_secret") + .open("r", encoding="utf-8") + .read() + .strip() + ) @cache