From 1de5f5bc86de12bc4ee38aa29c3782e25af86207 Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 24 Dec 2022 10:24:43 +0700 Subject: [PATCH] put webhook url in env vars --- env/tubearchivist.sample.env | 2 ++ tubearchivist/web/src/webhook_github.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/env/tubearchivist.sample.env b/env/tubearchivist.sample.env index c1dbddd..76b1f4a 100644 --- a/env/tubearchivist.sample.env +++ b/env/tubearchivist.sample.env @@ -3,6 +3,8 @@ ROADMAP_HOOK_URL=https://discordapp.com/api/webhooks/000000000000000000/aaaaaaaa DOCKER_UNSTABLE_HOOK_URL=https://discordapp.com/api/webhooks/000000000000000000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GITHUB_RELEASE_HOOK_URL=https://discord.com/api/webhooks/000000000000000000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa NOTIFICATION_TEST_HOOK_URL=https://discord.com/api/webhooks/000000000000000000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +GITHUB_TA_HOOK_URL=https://discord.com/api/webhooks/000000000000000000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +GITHUB_COMPANION_HOOK_URL=https://discord.com/api/webhooks/000000000000000000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GH_HOOK_SECRET=xxxxxxxxxxxxxxxxxxxxxxxx DOCKER_HOOK_SECRET=yyyyyyyyyyyyyyyyyyyyyyyy \ No newline at end of file diff --git a/tubearchivist/web/src/webhook_github.py b/tubearchivist/web/src/webhook_github.py index 85e6762..dd2d82b 100644 --- a/tubearchivist/web/src/webhook_github.py +++ b/tubearchivist/web/src/webhook_github.py @@ -5,6 +5,7 @@ import json from datetime import datetime from hashlib import sha256, md5 from hmac import HMAC, compare_digest +from os import environ from bs4 import BeautifulSoup import requests @@ -15,8 +16,8 @@ from src.webhook_base import WebhookBase HOOK_URL = { - "tubearchivist/browser-extension": "https://discord.com/api/webhooks/1048456394979946547/OskydG_dgtcHxPVn-khyKDy_qu9J4UbUo9ipGSKVaS6CzvuMRkuPq3aXpIYds2Zuhr3A", - "tubearchivist/tubearchivist": "https://discord.com/api/webhooks/1048906149463867472/QREIvEFxeUzflxvX6W-cpbE47-HwcYcuA3hFzcMhljLpTzuBd2LvWvrL-g7-4v6JpDIu", + "tubearchivist/browser-extension": environ.get("GITHUB_COMPANION_HOOK_URL"), + "tubearchivist/tubearchivist": environ.get("GITHUB_TA_HOOK_URL"), }