diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2023-03-14 10:52:31 +0100 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2023-03-14 10:52:31 +0100 |
commit | 6af2c97fbe1d3642fb89f7d2dd0c63dcadb531ab (patch) | |
tree | 17c51a810113250be52916383f836a5b09cb9085 /labbot/addons/echo.py | |
parent | 0a940eb06326643ee7271df036ca7de47cadd132 (diff) | |
download | lab-bot-6af2c97fbe1d3642fb89f7d2dd0c63dcadb531ab.tar.gz lab-bot-6af2c97fbe1d3642fb89f7d2dd0c63dcadb531ab.zip |
stash 0a940eb06326643ee7271df036ca7de47cadd132: add example commandsstash/command/commands
Diffstat (limited to 'labbot/addons/echo.py')
-rw-r--r-- | labbot/addons/echo.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/labbot/addons/echo.py b/labbot/addons/echo.py new file mode 100644 index 0000000..8011690 --- /dev/null +++ b/labbot/addons/echo.py @@ -0,0 +1,14 @@ +from labbot.commands import commands + +@commands.command() +async def echo(event, gl, message): + url = f"/projects/{event.project_id}/issues/{event.data['issue']['iid']}/notes" + await gl.post(url, data={"body": message}) + +@commands.command() +async def time(event, gl): + url = f"/projects/{event.project_id}/issues/{event.data['issue']['iid']}/notes" + await gl.post(url, data={"body": event.data["issue"]["updated_at"]}) + +def setup(bot) -> None: + pass |