mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 10:55:17 +00:00
Add validation checks for 'latest_comment' and 'pr_url' in GitHub polling server
This commit is contained in:
parent
9bec97c66c
commit
b034d16c23
1 changed files with 2 additions and 0 deletions
|
|
@ -80,6 +80,8 @@ async def polling_loop():
|
|||
if 'subject' in notification and notification['subject']['type'] == 'PullRequest':
|
||||
pr_url = notification['subject']['url']
|
||||
latest_comment = notification['subject']['latest_comment_url']
|
||||
if not isinstance(latest_comment, str) or not latest_comment or not pr_url:
|
||||
continue
|
||||
async with session.get(latest_comment, headers=headers) as comment_response:
|
||||
if comment_response.status == 200:
|
||||
comment = await comment_response.json()
|
||||
|
|
|
|||
Loading…
Reference in a new issue