formatters: gitlab webhook: token is optional

This commit is contained in:
Guilhem Saurel 2024-03-07 17:41:07 +01:00
parent d339485430
commit dcda34e220

View File

@ -94,7 +94,8 @@ def gitlab_webhook(data, headers):
body.append(f"by {user_name}.")
data["body"] = " ".join(body)
data["key"] = headers["X-Gitlab-Token"]
if "X-Gitlab-Token" in headers:
data["key"] = headers["X-Gitlab-Token"]
return data