mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[enh] better travis/gitlab pipeline message
This commit is contained in:
parent
d9fbceac31
commit
aaf6f23a5c
1 changed files with 3 additions and 1 deletions
|
@ -460,10 +460,12 @@ async def github(request):
|
||||||
repository = request.json["repository"]["name"]
|
repository = request.json["repository"]["name"]
|
||||||
user = request.json["sender"]["login"]
|
user = request.json["sender"]["login"]
|
||||||
url = request.json["commit"]["html_url"]
|
url = request.json["commit"]["html_url"]
|
||||||
|
commit_message = request.json["commit"]["commit"]["message"]
|
||||||
|
commit_author = request.json["commit"]["committer"]["name"]
|
||||||
|
|
||||||
if state not in ("success", "pending"):
|
if state not in ("success", "pending"):
|
||||||
await notify(
|
await notify(
|
||||||
f"[{repository}] {description} {target_url} on commit {url}"
|
f'[{repository}] {description} {target_url} on commit {url} "{commit_message.replace("\n", " ")}" by {commit_author}'
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
|
|
Loading…
Reference in a new issue