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"] = {