diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 627390c0..52c00552 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -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() diff --git a/pr_agent/tools/pr_code_suggestions.py b/pr_agent/tools/pr_code_suggestions.py index ca7b4d88..170bb00e 100644 --- a/pr_agent/tools/pr_code_suggestions.py +++ b/pr_agent/tools/pr_code_suggestions.py @@ -522,7 +522,7 @@ class PRCodeSuggestions: data = {"code_suggestions": []} for j, predictions in enumerate(prediction_list): # each call adds an element to the list if "code_suggestions" in predictions: - score_threshold = max(1, get_settings().pr_code_suggestions.suggestions_score_threshold) + score_threshold = max(1, int(get_settings().pr_code_suggestions.suggestions_score_threshold)) for i, prediction in enumerate(predictions["code_suggestions"]): try: if get_settings().pr_code_suggestions.self_reflect_on_suggestions: