ignore PR merges since associated pushes already show them

This commit is contained in:
Lephenixnoir 2021-03-22 21:42:23 +01:00
parent 8004351098
commit 9f7c228aef
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 1 additions and 8 deletions

9
app.py
View File

@ -83,13 +83,6 @@ def main():
msg = f"{url_user} a créé une PR: {url_pr} dans {url_repository}"
if event == "pull_request" and data["action"] == "closed":
action = "fusionné" if data["pull_request"]["merged"] else "fermé"
url_user = make_url_user(data["sender"])
url_pr = f"[url={data['pull_request']['url']}]{data['pull_request']['title']}[/url]"
msg = f"{url_user} a {action} la PR {url_pr} dans {url_repository}"
if event == "repository" and data["action"] == "created":
url_user = make_url_user(data['sender'])
msg = f"{url_user} a créé un nouveau dépôt {url_repository}"
@ -97,7 +90,7 @@ def main():
if event == "push" and all(c == '0' for c in data["after"]):
return "IGN"
if event == "pull_request" and data["action"] in ["assigned", "synchronized"]:
if event == "pull_request" and data["action"] in ["assigned", "closed", "synchronized"]:
return "IGN"
if event == "fork":