diff --git a/glu/__main__.py b/glu/__main__.py index 101772b..92abe40 100644 --- a/glu/__main__.py +++ b/glu/__main__.py @@ -6,7 +6,7 @@ from cachetools import LRUCache from gidgethub import aiohttp as gh_aiohttp, routing, sansio from gidgethub.apps import get_installation_access_token, get_jwt -from glu import pylon # , zendesk +from glu import pylon, zendesk import glu.events as event from glu.config_loader import config from glu import runtime_constants @@ -65,7 +65,7 @@ async def main(): # await zendesk.init() app = web.Application() app.router.add_post("/", github_payloads) - # app.router.add_post("/zendesk", zendesk.webhook_handler) + app.router.add_post("/zendesk", zendesk.webhook_handler) app.router.add_post("/pylon", pylon.webhook) app.router.add_get("/pylon/sidebar", pylon.sidebar) port = int(config["server"].get("port", 8000)) diff --git a/pyproject.toml b/pyproject.toml index 93e61d5..5fa5100 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ dependencies = [ "slack-sdk>=3.33.4", "snscrape>=0.7.0.20230622", "stripe>=11.3.0", + "zenpy>=2.0.56", ] # [build-system] diff --git a/scripts/deploy.sh b/scripts/deploy.sh index c108cdb..9be305b 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -27,7 +27,7 @@ Description=Glu Bot After=network.target [Service] -Environment=HOME='/root' +Environment=HOME='/root' PATH='/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' ExecStartPre=sh -c 'git reset --hard && git pull --ff' ExecStart=doppler run --mount BotConfig.toml --mount-template BotConfig_tmpl.toml --mount-max-reads 1 -- uv run python3 -m glu Restart=always diff --git a/uv.lock b/uv.lock index 227e56d..580ed18 100644 --- a/uv.lock +++ b/uv.lock @@ -297,6 +297,7 @@ dependencies = [ { name = "slack-sdk" }, { name = "snscrape" }, { name = "stripe" }, + { name = "zenpy" }, ] [package.metadata] @@ -314,6 +315,7 @@ requires-dist = [ { name = "slack-sdk", specifier = ">=3.33.4" }, { name = "snscrape", specifier = ">=0.7.0.20230622" }, { name = "stripe", specifier = ">=11.3.0" }, + { name = "zenpy", specifier = ">=2.0.56" }, ] [[package]] @@ -774,6 +776,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, ] +[[package]] +name = "pytz" +version = "2024.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/31/3c70bf7603cc2dca0f19bdc53b4537a797747a58875b552c8c413d963a3f/pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a", size = 319692 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/11/c3/005fcca25ce078d2cc29fd559379817424e94885510568bc1bc53d7d5846/pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725", size = 508002 }, +] + [[package]] name = "requests" version = "2.32.3" @@ -951,3 +962,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f5/d5/688db678e987c3e0fb17867970700b92603cadf36c56e5fb08f23e822a0c/yarl-1.18.3-cp313-cp313-win_amd64.whl", hash = "sha256:578e281c393af575879990861823ef19d66e2b1d0098414855dd367e234f5b3c", size = 315723 }, { url = "https://files.pythonhosted.org/packages/f5/4b/a06e0ec3d155924f77835ed2d167ebd3b211a7b0853da1cf8d8414d784ef/yarl-1.18.3-py3-none-any.whl", hash = "sha256:b57f4f58099328dfb26c6a771d09fb20dbbae81d20cfb66141251ea063bd101b", size = 45109 }, ] + +[[package]] +name = "zenpy" +version = "2.0.56" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cachetools" }, + { name = "python-dateutil" }, + { name = "pytz" }, + { name = "requests" }, + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4f/85/1b5ebad3c35cdbbeffa46aae52fe04c155732a45317e766d91865691a890/zenpy-2.0.56.tar.gz", hash = "sha256:984cdcd93dde5d70fa0e2d5c1d1878b8700dc26df63ca3414f6b55577423cb1c", size = 87614 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a6/f1/9f6332b75ef6bc270f063af5101202a6fe1c1ef7ef41e43ca013f7871c07/zenpy-2.0.56-py3-none-any.whl", hash = "sha256:7cd73421f9903034b53fbe32968359574892e29410db1895f999f5bacb4c91db", size = 89201 }, +]