mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Use POST request in github hooks
This commit is contained in:
parent
dacf8c5696
commit
580ed5bf04
1 changed files with 2 additions and 1 deletions
|
@ -402,13 +402,14 @@ def ses_identify():
|
|||
return response
|
||||
|
||||
|
||||
@app.route("/hooks/github")
|
||||
@app.route("/hooks/github", methods=["POST"])
|
||||
def hooks_github():
|
||||
try:
|
||||
j = request.get_json()
|
||||
except Exception:
|
||||
abort(400)
|
||||
return
|
||||
# TODO: add secret check
|
||||
message = f"🐙 {j['size']} aggiornamenti a Royalnet ricevuti:\n"
|
||||
for commit in j.get("commits", []):
|
||||
message += f"<b>{commit['message']}</b> di {commit['author']}\n"
|
||||
|
|
Loading…
Reference in a new issue