From 217249c8a3175d54855a91fa6c688af685c3ba3a Mon Sep 17 00:00:00 2001 From: Andy <119136210+AndyMik90@users.noreply.github.com> Date: Fri, 26 Dec 2025 09:24:01 +0100 Subject: [PATCH] fix(github): add explicit GET method to gh api comment fetches (#294) The gh api command defaults to POST for comment endpoints, causing GitHub to reject the 'since' query parameter as an invalid POST body field. Adding --method GET explicitly forces a GET request, allowing the since parameter to work correctly for fetching comments. This completes the fix started in f1cc5a09 which only changed from -f flag to query string syntax but didn't address the HTTP method. --- apps/backend/runners/github/gh_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/backend/runners/github/gh_client.py b/apps/backend/runners/github/gh_client.py index c4476926..45034476 100644 --- a/apps/backend/runners/github/gh_client.py +++ b/apps/backend/runners/github/gh_client.py @@ -667,7 +667,7 @@ class GHClient: # Fetch inline review comments # Use query string syntax - the -f flag sends POST body fields, not query params review_endpoint = f"repos/{{owner}}/{{repo}}/pulls/{pr_number}/comments?since={since_timestamp}" - review_args = ["api", review_endpoint] + review_args = ["api", "--method", "GET", review_endpoint] review_result = await self.run(review_args, raise_on_error=False) review_comments = [] @@ -680,7 +680,7 @@ class GHClient: # Fetch general issue comments # Use query string syntax - the -f flag sends POST body fields, not query params issue_endpoint = f"repos/{{owner}}/{{repo}}/issues/{pr_number}/comments?since={since_timestamp}" - issue_args = ["api", issue_endpoint] + issue_args = ["api", "--method", "GET", issue_endpoint] issue_result = await self.run(issue_args, raise_on_error=False) issue_comments = []