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

Clarify create_pull_request_review input schema definition for: 'position'#133

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

Conversation

jamipouchi
Copy link

Why

I have been playing with github's mcp server, and have found that it is incapable of adding comments due to:

McpError: MCP error -32603: failed to create pull request review: POST https://api.github.com/repos/owner/name/pulls/pullId/reviews: 422 Unprocessable Entity [{Resource: Field: Code: Message:Pull request review thread position is invalid and Pull request review thread diff hunk can't be blank}]

This is because the current definition for theposition input parameter is wrong:

    line number in the file

This is a clear misconception, as even the githubapi documentation states aNote specifying that the position is NOT the line number in the file, but of the diff.

What

I have changed the description to better reflect what the input actually is. I have based it on the REST API documentation, and my tests.

How

I have used:claude-3-5-sonnet-latest with a simple loop:

  • it is given a pr and the tool to get the file for more context
  • When all files have been looked at, it is asked to create a pr review

The description is a bit longer than I would have liked, but I have seen that it has a hard time understanding what this position actually means, and this has given the best results.

Alternatives

  • Changing this position to be the line of the file. Thought that would require changing how the REST API endpoint works, and is not so simple, as a single fine line, might have multiple positions in a diff (ex. when there is a deletion and addition)
  • A similar description that works better (that requires testing a broader set of cases than I have)

@juruen
Copy link
Collaborator

juruen commentedApr 6, 2025
edited
Loading

Thank you for your contribution and for bringing this to our attention. I believe this is being addressed in#118, where we also introduce the use of new line-related parameters.

Having said that, let's do some tests and see if we need to update the new description in#118 to make it succeed.

Noteposition is deprecated, and we'll eventually drop it in favor ofline,start_line, etc.

@jamipouchi
Copy link
Author

Thank you for your contribution and for bringing this to our attention. I believe this is being addressed in#118, where we also introduce the use of new line-related parameters.

Having said that, let's do some tests and see if we need to update the new description in#118 to make it succeed.

Noteposition is deprecated, and we'll eventually drop it in favor ofline,start_line, etc.

Yep, that's right, should have seen that it was already being addressed 😅
Closing this, happy to test the new changes and see if it works well.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@jamipouchi@juruen

[8]ページ先頭

©2009-2025 Movatter.jp