* add team tool with tests
* add to tools
* add toolsnaps and docs
* Update pkg/github/context_tools.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* rewrite to allow providing user
* rRename get_my_teams to get_teams and update documentation and tests
* remove old snap
* rm old comments
* update test teams to numbered examples
* Update descriptions for allow finding teams of other users
* return empty result over custom empty error
* fix test expectations for no teams found
* flatten teams response to not include Nodes
* update description to include clarification about teams you are a member of
* fix typo in tool desc
* updated description to be more generic for accecss note
* amended error handling
* Update pkg/github/context_tools.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add additional tool to get team members
* update tool desc for get_team_members to include warning about auth
* added new scope info
* refactor to parse params individually
* GetTeams - rename "login" field to "org"
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: LuluBeatson <lulubeatson@github.com>
Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>
* Enhance search functionality with new query filters and utility functions
- Added multiple test cases for searching issues with various query filters in `issues_test.go`.
- Introduced utility functions in `search_utils.go` to check for specific filters and extract repository information from queries.
- Created comprehensive tests in `search_utils_test.go` to validate the new filtering logic and ensure accurate query parsing.
* Refactor repository filter extraction in search utilities
- Renamed `extractRepoFilter` to `hasRepoFilter` to simplify the function's purpose.
- Updated test cases in `search_utils_test.go` to reflect the new function name and logic.
- Adjusted tests to focus on the presence of the `repo:` filter rather than extracting owner and repo details.
* Enhance search functionality with additional query filters and utility functions
- Added new test cases for searching pull requests and users with various query filters in `pullrequests_test.go` and `search_test.go`.
- Implemented a utility function `hasTypeFilter` in `search_utils.go` to check for the presence of `type:` filters in queries.
- Updated the search handler to conditionally prepend the `type:` filter based on the presence of existing filters, improving query handling.
* Updated both regex patterns to handle this edge case
* docs: add required GitHub token permissions per action (#128)
* Feat: Add support for GitHub Releases (list and latest) tools
* Update repositories.go
Update params
* Update README.md
Add only new tool to the readme
* Revise GitHub PAT instructions and permissions section
* Readme formatting
---------
Co-authored-by: Arya Soni <aryasoni98@gmail.com>
Co-authored-by: Arya Soni <18515597+aryasoni98@users.noreply.github.com>
* make resolveGitReference function more robust, add comments to follow the logic
* add tests for new functionality
* lint fix 1
* fix linting by using inverted if instead of empty if block
* remove unused var
* refactor
* remove comment
* small fix
* add ref == "" case in switch statement, use originalRef instead of ref in case definitions and some of the logic
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
* initial changes
* Further advances on list_issues tool to use GRPC
* Updating pagination for Graphql ListIssues
* Sorting data structures & returning mapped Issue
* Adding dynamic label queries
* Adding dynamic state queries for list_issues
* Add optional since filter, to get issues based on last update to issue
* Move ListIssues test to graphql format & removal of temp file
* Update documentation and fix linter issues
* Removal of redundant code, and increase limit on label return
* Fixing context for status to allow for better interactions
* Update tool snaps with tool description
* Update docs for final changes to context
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.
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>
* added updatedAt and Author (aka User) login to query and payload
* added initial support for orderby and direction
* sort by created at instead of updated at by default
* remove unused code
* refactor to map to most suitable query based on user inputs at runtime
* updated readme with new description
* restore original categoryID code, simplify vars management
* quick fix
* update tests to account for recent changes (author login, updated at date)
* use switch statement for better readability
* remove comment
* linting
* refactored logic, simplified switch statement
* linting
* use original queries from discussions list tool for testing
* linting
* remove logging
* Complete merge by re-introducing pagination to ListDiscussions
* fix unit tests
* refactor: less repetitive interface
---------
Co-authored-by: LuluBeatson <lulubeatson@github.com>
Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>
* Create 'add sub-issue' tool
* Fix hardcoded API host
* Create 'list sub-issues' tool
* Create 'remove sub-issue' tool
* Fix Test_GetIssue mock data - add missing User field
The assertion was already checking User.Login but the mock was incomplete
* Create 'reprioritize sub-issue' tool
* fixes
* use go github pck to add sub-issues
* Update to use go github package
* update description
* update to use go github v73
* lint, docs
* refactor: tests to use go-github-mock
* add toolsnaps
* make RemoveSubIssue use NewGitHubAPIErrorResponse, update docstring
* Always include SHA in get_file_contents responses (#676)
* fix: Add SHA to get_file_contents while preserving MCP behavior (#595)
Enhance get_file_contents to include SHA information without changing
the existing MCP server response format.
Changes:
- Add Contents API call to retrieve SHA before fetching raw content
- Include SHA in resourceURI (repo://owner/repo/sha/{SHA}/contents/path)
- Add SHA to success messages
- Update tests to verify SHA inclusion
- Maintain original behavior: text files return raw text, binaries return base64
This preserves backward compatibility while providing SHA information
for better file versioning support.
Closes#595
* fix: Improve error handling for Contents API response
Ensure response body is properly closed even when an error occurs by moving
the defer statement before the error check. This prevents potential resource
leaks when the Contents API returns an error with a non-nil response.
Changes:
- Move defer respContents.Body.Close() before error checking
- Rename errContents to err for consistency
- Add nil check for respContents before attempting to close body
This follows Go best practices for handling HTTP responses and prevents
potential goroutine/memory leaks.
* revert changes to resource URI
* use GraphQL API to get file SHA
* refactor: mock GQL client instead of getFileSHA function to follow conventions
* lint
* revert GraphQL
---------
Co-authored-by: LuluBeatson <lulubeatson@github.com>
* Reorganize README, add dedicated install guides, include policies and governance info for the github server (#695)
* Refactor README and add host installation guides, governance docs
- Reorganized README for clarity and navigation
- Added dedicated installation guides for Claude, Cursor, Windsurf, JetBrains, and more
- Clarified contribution guidelines and approval criteria
- Added policies and governance documentation
* Update README.md
* Update README with configuration section for remote GitHub MCP Server
* Update MCP access policy description in README
Removing coding agent from the policy note, as the GitHub server is unaffected by this policy
* Update configuration steps for GitHub Copilot in JetBrains IDEs...
...to reflect changes in accessing settings and configuring MCP.
* Update install-other-copilot-ides.md
* Update Eclipse MCP support version and configuration steps...
...for GitHub Copilot plugin in installation guide.
* Update docs/installation-guides/install-cursor.md
* Update docs/installation-guides/install-windsurf.md
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
* Apply suggestion from @tonytrg
---------
Co-authored-by: Tony Truong <tonytrg@github.com>
* fix: shorten long tool name for adding pr review comments (#697)
* shorten tool name
* update function name to match tool name
* adjust wording of descriptions
* Update installation guide for GitHub MCP Server (#699)
* Update installation guide for GitHub MCP Server
Removed reference to GitHub.com in the installation guide. The GitHub server is available to Coding Agent by default, without installation needed.
* Rename section to 'Install in Other MCP Hosts'
Updating title for consistency and adding a link to the "other Copilot IDEs" install guide.
* Revise installation guide for Cursor MCP setup
Updated installation guide for Cursor with steps clarified, remote server installation, and one-click install deeplinks to open Cursor and add the github server to the config file.
* fix: make mcpcurl support "integer" type (#688)
- FYI:https://json-schema.org/understanding-json-schema/reference/numeric#integer
* Added installation instructions for mcpcurl (#719)
* Added installation instructions for mcpcurl
* Update cmd/mcpcurl/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 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>
* shorten param descriptions
* fix: resp nil check in error handling in RemoveSubIssue function
---------
Co-authored-by: LuluBeatson <lulubeatson@github.com>
Co-authored-by: tommaso-moro <tommaso-moro@github.com>
* fix: Add SHA to get_file_contents while preserving MCP behavior (#595)
Enhance get_file_contents to include SHA information without changing
the existing MCP server response format.
Changes:
- Add Contents API call to retrieve SHA before fetching raw content
- Include SHA in resourceURI (repo://owner/repo/sha/{SHA}/contents/path)
- Add SHA to success messages
- Update tests to verify SHA inclusion
- Maintain original behavior: text files return raw text, binaries return base64
This preserves backward compatibility while providing SHA information
for better file versioning support.
Closes#595
* fix: Improve error handling for Contents API response
Ensure response body is properly closed even when an error occurs by moving
the defer statement before the error check. This prevents potential resource
leaks when the Contents API returns an error with a non-nil response.
Changes:
- Move defer respContents.Body.Close() before error checking
- Rename errContents to err for consistency
- Add nil check for respContents before attempting to close body
This follows Go best practices for handling HTTP responses and prevents
potential goroutine/memory leaks.
* revert changes to resource URI
* use GraphQL API to get file SHA
* refactor: mock GQL client instead of getFileSHA function to follow conventions
* lint
* revert GraphQL
---------
Co-authored-by: LuluBeatson <lulubeatson@github.com>
* add contingency to match path in git tree
* resolveGitReference helper
* fix: handling of directories
* Test_filterPaths
* filterPaths - trailing slashes
* fix: close response body, improve error messages, docs
* update tool result message about resolved git ref
* unit test cases for filterPaths maxResults param
* resolveGitReference - NewGitHubAPIErrorToCtx