[mod] also list branches on which pipeline is

This commit is contained in:
Laurent Peuch 2020-05-06 22:22:01 +02:00
parent da3a8b14b2
commit c16e84fda7

View file

@ -462,10 +462,11 @@ async def github(request):
url = request.json["commit"]["html_url"]
commit_message = request.json["commit"]["commit"]["message"].replace("\n", " ")
commit_author = request.json["commit"]["committer"]["login"]
branches = ", ".join((x["name"] for x in request.json["commit"]["branches"]))
if state not in ("success", "pending"):
await notify(
f'[{repository}] {description} {target_url} on commit {url} "{commit_message}" by @{commit_author}'
f'[{repository}] {description} {target_url} on commit {url} "{commit_message}" by @{commit_author} on branche{"s" if len(branches) > 1 else ""} {branches}'
)
else:
print(