Commit Graph

44 Commits

Author SHA1 Message Date
Kirsten Laskoski d65d1d5455 fix: correct descriptions for PR/issue searching (#840)
Fix #839 by updating the descriptions for the `owner` and `repo`
parameters for the `search_issues` and `search_pull_requests` tools to
no longer reference notifications but issues and pull requests,
respectively.
2025-08-08 13:34:04 +01:00
Tommaso Moro 521d5e9258 Bump go-github to v74 (#826)
* update all imports to use v74

* go mod tidy

* update third party licenses

* rename

* autogen licenses
2025-08-06 22:11:50 +01:00
MayorFaj 45e90aedd4 feat: add reviewers parameter to UpdatePullRequest (#285)
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
License Check / license-check (push) Has been cancelled
* feat: add reviewers parameter to UpdatePullRequest and update tests

* Update pullrequests.go

* feat: enhance update pull request functionality with reviewers support

* update README to clarify optional reviewers parameter in API documentation- go run ./cmd/github-mcp-server generate-docs

* feat: enhance UpdatePullRequest to return early if no updates or reviewers are provided

* Add updating draft state to `update_pull_request` tool (#774)

* initial impl of pull request draft state update

* appease linter

* update README

* add nosec

* fixed err return type for json marshalling

* add gql test

* Add support for org-level discussions in list_discussions tool (#775)

* make repo optional, and default to .github when not provided. improve tool description

* autogen

* update tests

* small copy paste error fixes

* refactor: streamline UpdatePullRequest logic and enhance test cases for reviewer updates

* refactor: remove redundant draft update tests and streamline UpdatePullRequest logic

* test: add unit tests for updating pull request draft state

* refactor: simplify UpdatePullRequest tests by removing unused mock data

---------

Co-authored-by: Matt Holloway <mattdholloway@github.com>
Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
2025-07-31 11:05:38 +01:00
Matt Holloway d5e1f48728 Add updating draft state to update_pull_request tool (#774)
* initial impl of pull request draft state update

* appease linter

* update README

* add nosec

* fixed err return type for json marshalling

* add gql test
2025-07-29 10:58:06 +01:00
Matt Holloway 7ccc6b6493 Add pagination support to GraphQL-based tools (#683)
* initial pagination for `ListDiscussions`

* redo category id var cast

* add GraphQL pagination support for discussion comments and categories

* remove pageinfo returns

* fix out ref for linter

* update docs

* move to unified pagination for consensus on params

* update docs

* refactor pagination handling

* update docs

* linter fix

* conv rest to gql params for safe lint

* add nolint

* add error handling for perPage value in ToGraphQLParams

* refactor pagination error handling

* unified params for rest andn graphql and rennamed to be uniform for golang

* add 'after' for pagination

* update docs

* Update pkg/github/discussions.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/discussions.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update pkg/github/discussions_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update default page size const

* reduce default pagination size from 100 to 30 in discussion tests

* update pagination for reverse and total

* update pagination to remove from discussions

* updated README

* improve the `ToGraphQLParams` function

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 16:31:29 +01:00
Lulu b5e3348179 fix: shorten long tool name for adding pr review comments (#697)
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
* shorten tool name

* update function name to match tool name

* adjust wording of descriptions
2025-07-18 10:57:05 +01:00
Martin Høst Normark be91795fd3 Bump go-github to v73.0.0 (#597)
* Bump go-github to v73.0.0

* Clean up go.mod and update licenses

* Updated remaining imports to use github package v73 instead of v72

---------

Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
Co-authored-by: tommaso-moro <tommaso-moro@github.com>
2025-07-15 15:21:24 +01:00
Tommaso Moro 42e5ce9b88 Tommy/(Bug-fix): adjust tool description to account for author in prompt (#658)
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
* adjust tool description

* removed dead code

* improve desription

* update description for tests
2025-07-11 09:21:45 +01:00
JoannaaKL 8bd715235b Add repo and owner 2025-06-26 13:53:13 +02:00
JoannaaKL 805358ba3d Split pr and issue search
Add description

Extract common code

Test fixes

Updated search description

Move search prs to prs toolset

Update tools snaps
2025-06-26 13:53:13 +02:00
JoannaaKL 5f924342f1 Add search pull requests tool 2025-06-26 13:53:13 +02:00
anant-rustagi 23b16cfeb7 feat: add pagination support to get_pull_request_files tool (#561)
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
Lint / lint (push) Has been cancelled
- Add WithPagination() to tool definition
- Use OptionalPaginationParams to handle page and perPage parameters
- Pass pagination parameters to GitHub API ListFiles call
- Update tests to include pagination scenarios
- Update tool schema snapshot

Fixes #527

Co-authored-by: Anant rustagi <anantrustagi@Anants-MacBook-Pro.local>
2025-06-25 16:26:53 +02:00
Sam Morrow f90ff16f2e move to new approach and update testing 2025-06-25 08:12:38 +02:00
Adam Holt 36e6add0dd Return concrete error types for API errors 2025-06-25 08:12:38 +02:00
Lulu cbcf29f6d1 Export ToBoolPtr and RequiredParam (#495)
* ToBoolPtr, RequiredParam

* lint: type assertion in RequiredParam

* cap docstring
2025-06-09 15:11:38 +02:00
Pranav RK c7a872b9a1 Bump go-github to v72.0.0 2025-06-02 10:55:04 +02:00
Theo Brigitte 414309ccc2 Remove non-existent get_line_number_in_pull_request_file tool reference
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
License Check / license-check (push) Has been cancelled
Lint / lint (push) Has been cancelled
2025-05-26 07:40:57 +02:00
William Martin eca853b28a Split PR review creation, commenting, submission and deletion 2025-05-19 17:50:36 +02:00
William Martin a6d3c5ea5c Update pkg/github/pullrequests.go
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
2025-05-14 22:57:43 +02:00
William Martin 2fb1be93f5 Support requesting copilot as a reviewer 2025-05-14 22:57:43 +02:00
Arya Soni a563bd6e1d Add request_copilot_review tool with placeholder implementation 2025-05-14 22:57:43 +02:00
dependabot[bot] 705b61b814 build(deps): bump github.com/mark3labs/mcp-go from 0.25.0 to 0.27.0 (#397)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William Martin <williammartin@github.com>
2025-05-13 13:26:36 +02:00
Sam Morrow a58937c0b3 feat: provide tool annotations 2025-04-23 13:14:01 +02:00
Toby Padilla 9fa582d8d6 fix: use anyOf instead of nullable type array
License Check / license-check (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
Lint / lint (push) Has been cancelled
Windsurf is erroring on the `create_pull_request` tool because we're
using an array of types to make fields nullable. This PR uses `anyOf`
instead and should fix the issue.
2025-04-21 21:19:24 +02:00
Toby Padilla 22e493620c fix: update json schema for create_pull_request_review to make OpenAI compatible (#300)
Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-17 12:50:19 +02:00
Tony Truong 4457d0ac30 Add missing enum constraints (#278)
* Add missing enum constraints

* Remove redundant listing of additional enums in descriptions

---------

Co-authored-by: Sam Morrow <info@sam-morrow.com>
2025-04-15 17:01:33 +02:00
Ashwin Bhat 6c05b4009a Add tools for one-off PR comments and replying to PR review comments (#143)
* Add add_pull_request_review_comment tool for PR review comments

Adds the ability to add review comments to pull requests with support for line, multi-line, and file-level comments, as well as replying to existing comments.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add reply_to_pull_request_review_comment tool

Adds a new tool to reply to existing pull request review comments using the GitHub API's comment reply endpoint. This allows for threaded discussions on pull request reviews.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update README with new PR review comment tools

* rebase

* use new getClient function inadd and reply pr review tools

* Unify PR review comment tools into a single consolidated tool

The separate AddPullRequestReviewComment and ReplyToPullRequestReviewComment tools have been merged into a single tool that handles both creating new comments and replying to existing ones. This approach simplifies the API and provides a more consistent interface for users.

- Made commit_id and path optional when using in_reply_to for replies
- Updated the tests to verify both comment and reply functionality
- Removed the separate ReplyToPullRequestReviewComment tool
- Fixed test expectations to match how errors are returned

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Update README to reflect the unified PR review comment tool

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Javier Uruen Val <juruen@github.com>
2025-04-12 11:45:10 +02:00
Sam Morrow 3ec8699deb chore: groundwork for multi-user to server 2025-04-10 01:59:03 +02:00
monotykamary 56c1fce434 feat: Add update_pull_request tool (#122)
* feat: add update_pull_request tool

* refactor: address feedback on optionalParamOK helper

* docs: add update_pull_request tool documentation

* refactor: update optionalParamsOK as exported member

* fix: rename to exported function
2025-04-09 08:11:10 +02:00
Sam Morrow 519ed9ebc7 chore: export remaining search + helpers 2025-04-08 09:43:52 +02:00
Sam Morrow c85dd07e5e chore: export pr funcs 2025-04-08 09:33:37 +02:00
William Martin 0f9ef6e708 Add pagination helper 2025-04-07 16:48:56 +02:00
Alexander Yastrebov 755b816b7c pkg/github: fix use of per page parameter
Page size tool parameter names were changed to `perPage` within #90
while GitHub API uses `per_page` parameter name.

This change fixes overlooked inconsistencies.

Follow up on #90
Follow up on #129
Fixes #136

Signed-off-by: Alexander Yastrebov <yastrebov.alex@gmail.com>
2025-04-07 16:48:56 +02:00
Ashwin Bhat 31471a4b4f Add line parameter support to create_pull_request_review tool (#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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* gofmt

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Javier Uruen Val <juruen@github.com>
2025-04-07 16:20:17 +02:00
William Martin 6f7458ae3c Conform list tools
License Check / license-check (push) Has been cancelled
Docker / build (push) Has been cancelled
Unit Tests / build (macos-latest) (push) Has been cancelled
Unit Tests / build (ubuntu-latest) (push) Has been cancelled
Unit Tests / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
Lint / lint (push) Has been cancelled
2025-04-04 15:51:50 +02:00
Javier Uruen Val 5f3926d535 add support for create_pull_request (#63)
Co-authored-by: Toby Padilla <toby@toby.sh>
2025-04-01 15:48:39 -06:00
Toby Padilla 5eb969e27b fix: add required fields for OpenAI API 2025-03-24 17:31:28 -06:00
Javier Uruen Val bc3bc766c8 use generic for helper functions 2025-03-24 17:28:21 +01:00
Javier Uruen Val d24038cbd2 validate tools params 2025-03-24 17:28:21 +01:00
Javier Uruen Val af22499413 fix array schemas (#37) 2025-03-24 17:17:58 +01:00
Javier Uruen Val 7c772d2612 add support for the create_pull_request_review_tool (#33) 2025-03-24 13:50:49 +01:00
Sam Morrow dd46f8a837 add a framework for translations 2025-03-20 18:33:30 +01:00
Javier Uruen Val 3dddc2abcd add initial tests 2025-03-17 13:26:14 +01:00
Javier Uruen Val 1c4cb29229 split into multiple files 2025-03-10 09:49:52 +01:00