mirror of
https://github.com/YunoHost/webhooks.git
synced 2024-09-03 19:56:54 +02:00
[fix] github uses windows endl but commit unix one -_-'
This commit is contained in:
parent
a8147aa21c
commit
68e7a3cba6
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ async def github(request):
|
||||||
|
|
||||||
if len(commits) == 1:
|
if len(commits) == 1:
|
||||||
url = commits[0]["url"]
|
url = commits[0]["url"]
|
||||||
commit_message = commits[0]["message"].replace("\r\n", " ")
|
commit_message = commits[0]["message"].replace("\r\n", " ").replace("\n", " ")
|
||||||
|
|
||||||
if len(commit_message) > 120:
|
if len(commit_message) > 120:
|
||||||
commit_message = commit_message[120:] + "..."
|
commit_message = commit_message[120:] + "..."
|
||||||
|
@ -84,7 +84,7 @@ async def github(request):
|
||||||
notify(f"[{repository}] @{user} pushed {len(commits)} commits to {branch}: {url}", repository=repository)
|
notify(f"[{repository}] @{user} pushed {len(commits)} commits to {branch}: {url}", repository=repository)
|
||||||
for commit in commits[-5:]:
|
for commit in commits[-5:]:
|
||||||
author = commit["author"]["name"]
|
author = commit["author"]["name"]
|
||||||
commit_message = commit["message"].replace("\r\n", " ")
|
commit_message = commit["message"].replace("\r\n", " ").replace("\n", " ")
|
||||||
|
|
||||||
if len(commit_message) > 120:
|
if len(commit_message) > 120:
|
||||||
commit_message = commit_message[120:] + "..."
|
commit_message = commit_message[120:] + "..."
|
||||||
|
|
Loading…
Reference in a new issue