mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[mod] also list branches on which pipeline is
This commit is contained in:
parent
da3a8b14b2
commit
c16e84fda7
1 changed files with 2 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue