From 07ddf670431a6d931d12a39e2841cf9a74ecf91e Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Sun, 14 Mar 2021 21:40:50 +0100 Subject: [PATCH] use repository.created instead of create.branch for master --- app.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app.py b/app.py index 17cf35b..562116a 100644 --- a/app.py +++ b/app.py @@ -90,19 +90,17 @@ def main(): msg = f"{url_user} a {action} la PR {url_pr} dans {url_repository}" - if event == "pull_request" and data["action"] == "assigned": - return "IGN" - - if event == "create" and data["ref_type"] == "branch": - if data["ref"] not in ["master", "main", "trunk"]: - return "IGN" + 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}" + if event == "pull_request" and data["action"] == "assigned": + return "IGN" + if event == "fork": return "IGN" - if event == "create" and data["ref_type"] == "tag": + if event == "create" and data["ref_type"] in ["tag", "branch"]: return "IGN" if not msg: