ignore forks

Forks are mostly interesting once they're pushed to or when PRs are
opened.
This commit is contained in:
Lephenixnoir 2021-03-14 09:38:15 +01:00
parent ebfeddf48c
commit b0482c36a5
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 1 deletions

5
app.py
View File

@ -16,10 +16,10 @@ def main():
event = request.headers['X-Gitea-Event']
msg = None
url_repository = make_url_repository(data["repository"])
if data["repository"]["private"]:
return "IGN"
url_repository = make_url_repository(data["repository"])
if event == "push" and data["commits"] != []:
commits = data["commits"]
@ -86,6 +86,9 @@ def main():
url_user = make_url_user(data['sender'])
msg = f"{url_user} a créé un nouveau dépôt {url_repository}"
if event == "fork":
return "IGN"
if event == "create" and data["ref_type"] == "tag":
return "IGN"