mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
Improve robustness of sender_id extraction in Bitbucket app server by using safe dictionary access
This commit is contained in:
@ -175,7 +175,7 @@ async def handle_github_webhooks(background_tasks: BackgroundTasks, request: Req
|
||||
username = actor["nickname"]
|
||||
log_context["sender"] = username
|
||||
|
||||
sender_id = data["data"]["actor"]["account_id"]
|
||||
sender_id = data.get("data", {}).get("actor", {}).get("account_id", "")
|
||||
log_context["sender_id"] = sender_id
|
||||
jwt_parts = input_jwt.split(".")
|
||||
claim_part = jwt_parts[1]
|
||||
|
Reference in New Issue
Block a user