diff --git a/plugins/GitHub/events/commit_comment.py b/plugins/GitHub/events/commit_comment.py index 23d7d05..2ee0d15 100644 --- a/plugins/GitHub/events/commit_comment.py +++ b/plugins/GitHub/events/commit_comment.py @@ -21,7 +21,7 @@ async def commit_comment(event, github_api): "url": event.data["comment"]["html_url"], "user": event.data["sender"]["login"], "avatar_url": event.data["sender"]["avatar_url"], - "message": response["commit"]["message"].split("\n")[0], + "first_line": response["commit"]["message"].split("\n")[0], } await protocols.dispatch(github_api, repository_name, "commit-comment", payload) diff --git a/plugins/GitHub/protocols/discord.py b/plugins/GitHub/protocols/discord.py index 004717e..50c1daf 100644 --- a/plugins/GitHub/protocols/discord.py +++ b/plugins/GitHub/protocols/discord.py @@ -111,9 +111,9 @@ async def discussion(hook_urls, repository_name, url, user, avatar_url, action, @protocols.register("discord", "commit-comment") -async def commit_comment(hook_urls, repository_name, url, user, avatar_url, message): +async def commit_comment(hook_urls, repository_name, url, user, avatar_url, first_line): message = f"**{repository_name}** - " - message += f":open_mouth: left a comment on commit: {url}\n> {message}" + message += f":open_mouth: left a comment on commit: {url}\n> {first_line}" await _send_messages(hook_urls, user, avatar_url, message) diff --git a/plugins/GitHub/protocols/irc.py b/plugins/GitHub/protocols/irc.py index 2057a59..51cf12e 100644 --- a/plugins/GitHub/protocols/irc.py +++ b/plugins/GitHub/protocols/irc.py @@ -85,8 +85,8 @@ async def discussion(channels, repository_name, url, user, avatar_url, action, d @protocols.register("irc", "commit-comment") -async def commit_comment(channels, repository_name, url, user, avatar_url, message): - message = f"{user} left a comment on commit: {message}" +async def commit_comment(channels, repository_name, url, user, avatar_url, first_line): + message = f"{user} left a comment on commit: {first_line}" shortened_url = await shorten(url) _send_messages(channels, [f"[{repository_name}] {message} {shortened_url}"])