Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Report error when API silently fails to add review comment#1441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
almaleksia merged 2 commits intomainfromalmaleksia/report-pr-review-commet-error
Nov 19, 2025

Conversation

@almaleksia
Copy link
Contributor

When line is out of range GraphQL API doesn't return error and we consider adding PR comment successful though it wasn't posted. The indication that something like this happened is empty thread id. This change adds thread id check and returns error with a hint to LLM how to fix the parameters in the next iteration.

Closes:#1214

@almaleksiaalmaleksia marked this pull request as ready for reviewNovember 18, 2025 14:17
@almaleksiaalmaleksia requested a review froma team as acode ownerNovember 18, 2025 14:17
CopilotAI review requested due to automatic review settingsNovember 18, 2025 14:17
Copilot finished reviewing on behalf ofalmaleksiaNovember 18, 2025 14:19
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds error detection and reporting when the GitHub GraphQL API silently fails to add a pull request review comment (indicated by an empty thread ID in the response). This commonly occurs when parameters like line numbers are out of range.

  • Added validation to check if the thread ID is nil after mutation
  • Returns a descriptive error message with hints for fixing common issues
  • Updated existing test mock to return a valid thread ID
  • Added new test case to verify the error handling for nil thread ID

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

FileDescription
pkg/github/pullrequests.goAdded nil check for thread ID afteraddPullRequestReviewThread mutation with helpful error message explaining possible causes (line number out of range, incorrect file path, invalid side)
pkg/github/pullrequests_test.goUpdated existing test mock to return a valid thread ID and added new test case validating error handling when thread ID is nil

Copy link
Contributor

@tommaso-morotommaso-moro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🚀

Love the hint for the LLM! great touch 💅

almaleksia and JaclynCodes reacted with heart emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@tommaso-morotommaso-morotommaso-moro approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

PullRequest tooladd_comment_to_pending_review is silently failed when parameterline+side refers to an unchanged line of code of the PR

3 participants

@almaleksia@tommaso-moro

[8]ページ先頭

©2009-2025 Movatter.jp