show new and merged PRs
This commit is contained in:
parent
b0482c36a5
commit
ce478b06ef
13
app.py
13
app.py
|
@ -77,6 +77,19 @@ def main():
|
|||
if data['action'] == "created":
|
||||
msg = f"{url_user} a répondu au ticket {url_issue} dans {url_repository}"
|
||||
|
||||
if event == "pull_request" and data["action"] == "opened":
|
||||
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 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 == "pull_request" and data["action"] == "assigned":
|
||||
return "IGN"
|
||||
|
||||
|
|
Loading…
Reference in New Issue