add branch names in push messages
This commit is contained in:
parent
bdb7805d40
commit
47fea7b77d
6
app.py
6
app.py
|
@ -57,8 +57,12 @@ def main():
|
|||
msg = f"{url_user} a créé une nouvelle branche {url_branch} dans {url_repository} : {message}{others}"
|
||||
# Pre-existing branch
|
||||
else:
|
||||
if data["ref"].startswith("refs/heads/"):
|
||||
branch = " (branche " + data["ref"][11:] + ")"
|
||||
else:
|
||||
branch = ""
|
||||
url_commits = f"[url={data['compare_url']}]{commit_count}[/url]"
|
||||
msg = f"{url_user} a poussé {url_commits} dans {url_repository} : {message}{others}"
|
||||
msg = f"{url_user} a poussé {url_commits} dans {url_repository}{branch} : {message}{others}"
|
||||
|
||||
if event == "push" and data["ref"].startswith("refs/tags/"):
|
||||
url_user = make_url_user(data['pusher'])
|
||||
|
|
Loading…
Reference in New Issue