use repository.created instead of create.branch for master
This commit is contained in:
parent
ce478b06ef
commit
07ddf67043
12
app.py
12
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:
|
||||
|
|
Loading…
Reference in New Issue