Fixed Git integration

This commit is contained in:
2026-06-09 15:31:31 +03:00
parent ad8035b908
commit 19d8e50505
3 changed files with 38 additions and 18 deletions
+5 -1
View File
@@ -57,7 +57,11 @@ def _post_close_notice(results: list[dict[str, Any]], owner: str, repo: str) ->
async def gitea_webhook(request: Request, db: Session = Depends(get_db)) -> dict[str, Any]:
body = await request.body()
settings = get_settings()
signature = request.headers.get("X-Gitea-Signature")
signature = (
request.headers.get("X-Gitea-Signature")
or request.headers.get("X-Gogs-Signature")
or request.headers.get("X-Hub-Signature-256")
)
if not _verify_gitea_signature(body, signature, settings.gitea_webhook_secret):
raise HTTPException(status_code=401, detail="Invalid webhook signature")