patch_extension_skip_types

Add validation for latest_comment and cast suggestions_score_threshold to int
This commit is contained in:
mrT23
2024-08-20 12:11:34 +03:00
parent 772499fce1
commit 2591a5d6c1
2 changed files with 3 additions and 1 deletions

View File

@ -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 latest_comment or not isinstance(latest_comment, str):
continue
async with session.get(latest_comment, headers=headers) as comment_response:
if comment_response.status == 200:
comment = await comment_response.json()