aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--labbot/addons/echo.py14
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