Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add line parameter support to create_pull_request_review tool #118

Merged
merged 5 commits into from
Apr 7, 2025

Conversation

ashwin-ant
Copy link
Contributor

Inline comments in pull request reviews only supported position previously. This adds line support as well (the API requires one or the other).

  • Updated schema to make path and body the only required fields
  • Added line parameter as alternative to position for inline comments
  • Updated handler to accept either position or line based on GitHub API spec
  • Added new test case that verifies line parameter works properly
  • Updated error messages for better validation

Closes: #112

🤖 Generated with Claude Code

- Updated schema to make path and body the only required fields
- Added line parameter as alternative to position for inline comments
- Updated handler to accept either position or line based on GitHub API spec
- Added new test case that verifies line parameter works properly
- Updated error messages for better validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ashwin-ant ashwin-ant force-pushed the pullrequestreviewline branch from 6fd0bb9 to e8e9ede Compare April 5, 2025 02:21
@juruen
Copy link
Collaborator

juruen commented Apr 5, 2025

@ashwin-ant thank you so much for your contribution!

We are using position–which is deprecated– to mimic what the Anthropic server was doing. However, now that the initial release is out, it's probably time to update it.

We should probably start using not only line but also side, start_line, and star_side. This will allow for multi-line comments.

We can probably leave position for a while until we confirm that using the new parameters is working fine.

If you want to update this PR to fully support that, it'd be awesome. Otherwise, I can try to get it done at some point next week.

- Added new parameters: line, side, start_line, start_side
- Added proper validation for multi-line comment parameters
- Improved validation logic to handle parameter combinations
- Added test cases for regular and multi-line comments
- Updated schema documentation for better tool discoverability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@ashwin-ant ashwin-ant force-pushed the pullrequestreviewline branch from e7ac2c9 to 0527bc5 Compare April 6, 2025 00:25
@ashwin-ant
Copy link
Contributor Author

@juruen updated! How does this look?

@juruen
Copy link
Collaborator

juruen commented Apr 6, 2025

@juruen updated! How does this look?

@ashwin-ant looks great! 😺

Copy link
Collaborator

@juruen juruen left a comment

Choose a reason for hiding this comment

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

LGTM! Let's get this merged! 🚀

@juruen juruen merged commit 31471a4 into github:main Apr 7, 2025
9 checks passed
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull request Apr 12, 2025
…#118)

* Add line parameter support to create_pull_request_review tool

- Updated schema to make path and body the only required fields
- Added line parameter as alternative to position for inline comments
- Updated handler to accept either position or line based on GitHub API spec
- Added new test case that verifies line parameter works properly
- Updated error messages for better validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* Expand PR review API with multi-line comment support

- Added new parameters: line, side, start_line, start_side
- Added proper validation for multi-line comment parameters
- Improved validation logic to handle parameter combinations
- Added test cases for regular and multi-line comments
- Updated schema documentation for better tool discoverability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* gofmt

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Javier Uruen Val <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create_pull_request_review tool does not support inline comments with line parameter
2 participants