aboutsummaryrefslogtreecommitdiff
path: root/labbot/addons/echo.py
blob: 801169026274db6ea00cbb3d8a9b1a0dd10b3690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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