Manage PR review messages

This commit is contained in:
Darks 2022-12-17 23:49:26 +01:00
parent 3608e1ec71
commit ea63163fd8
Signed by: Darks
GPG Key ID: 7515644268BE1433
1 changed files with 6 additions and 0 deletions

6
app.py
View File

@ -124,6 +124,12 @@ def main():
if event == "pull_request" and data["action"] in ["assigned", "closed", "synchronized", "edited"]:
return "IGN"
if event == "pull_request_review_approved" and data["action"] == "reviewed":
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 revu la PR {url_pr} dans {url_repository}"
if event == "fork":
return "IGN"