From bae787a2448cc5db81869778409f3c6a9857111b Mon Sep 17 00:00:00 2001 From: timofey Date: Sat, 5 Aug 2023 11:20:32 +0000 Subject: [PATCH] customize --- master.cfg | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/master.cfg b/master.cfg index 2ca1ae7..7caa900 100644 --- a/master.cfg +++ b/master.cfg @@ -172,6 +172,13 @@ c["titleURL"] = "https://gitea.parrrate.ru/PTV/radn-rs" c["buildbotURL"] = os.environ.get("BUILDBOT_WEB_URL", "http://localhost:8010/") + +class GiteaAuth(OAuth2Auth): + name = "Gitea" + authUri = "https://gitea.parrrate.ru/login/oauth/authorize" + tokenUri = "https://gitea.parrrate.ru/login/oauth/access_token" + + # minimalistic config to activate new web UI c["www"] = { "port": os.environ.get("BUILDBOT_WEB_PORT", 8010), @@ -180,13 +187,7 @@ c["www"] = { "console_view": {}, }, "change_hook_dialects": {}, - "auth": OAuth2Auth( - CLIENT_ID, - CLIENT_SECRET, - name="Gitea", - authUri="https://gitea.parrrate.ru/login/oauth/authorize", - tokenUri="https://gitea.parrrate.ru/login/oauth/access_token", - ), + "auth": GiteaAuth(CLIENT_ID, CLIENT_SECRET), } if GITEA_SECRET: c["www"]["change_hook_dialects"]["gitea"] = {