This commit is contained in:
Willy-JL
2024-03-10 11:17:42 +00:00
parent 7ff3ea0364
commit c0ed5bcd85
6 changed files with 11 additions and 66 deletions

View File

@@ -43,50 +43,6 @@ if __name__ == "__main__":
url = event["compare"]
color = 16723712 if event["forced"] else 3669797
# case "pull_request":
# pr = event["pull_request"]
# url = pr["html_url"]
# branch = pr["base"]["ref"] + (
# ""
# if pr["base"]["repo"]["full_name"] != pr["head"]["repo"]["full_name"]
# else f" <- {pr['head']['ref']}"
# )
# name = pr["title"][:50] + ("..." if len(pr["title"]) > 50 else "")
# title = f"Pull Request {event['action'].title()} ({branch}): {name}"
# match event["action"]:
# case "opened":
# desc = (pr["body"][:2045] + "...") if len(pr["body"]) > 2048 else pr["body"]
# color = 3669797
# fields.append(
# {
# "name": "Changed Files:",
# "value": str(pr["changed_files"]),
# "inline": True,
# }
# )
# fields.append(
# {
# "name": "Added:",
# "value": "+" + str(pr["additions"]),
# "inline": True,
# }
# )
# fields.append(
# {
# "name": "Removed:",
# "value": "-" + str(pr["deletions"]),
# "inline": True,
# }
# )
# case "closed":
# color = 16723712
# case "reopened":
# color = 16751872
# case _:
# sys.exit(1)
case "release":
match event["action"]:
case "published":