- Notifications
You must be signed in to change notification settings - Fork2.7k
Add ListProjects tool#1113
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
There was a problem hiding this 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 implements the first tool for GitHub Projects V2 API, adding functionality to list projects for users and organizations. The implementation addresses the missing projects support as referenced in the GitHub issue.
- Adds a new
list_projects
tool that can list projects for users or organizations with pagination and query filtering - Creates comprehensive test coverage for the new functionality
- Updates dependencies to support the new functionality
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pkg/github/projects.go | Implements the ListProjects function with API client integration and parameter handling |
pkg/github/projects_test.go | Comprehensive test suite covering success cases, error scenarios, and parameter validation |
pkg/github/tools.go | Registers the new projects toolset in the default toolset group |
pkg/github/toolsnaps/list_projects.snap | Tool schema snapshot for testing |
go.mod | Updates mapstructure dependency from v2.3.0 to v2.4.0 |
third-party-licenses.*.md | Updates license files to reflect the new mapstructure version |
Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.
"github.com/google/go-github/v74/github" | ||
"github.com/google/go-querystring/query" | ||
"github.com/mark3labs/mcp-go/mcp" | ||
"github.com/mark3labs/mcp-go/server" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[nitpick] The code duplicates the addOptions function that already exists in the go-github library. Consider using github.addOptions from the go-github package instead of implementing a custom version to reduce code duplication.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yes genius, it exists in go-github but is not exported.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
23630b3
intomainUh oh!
There was an error while loading.Please reload this page.
* Bump go-viper/mapstructure* Update github.com/go-viper/mapstructure/v2 version in licenses* Add tool to list projects* Fix ordering
Uh oh!
There was an error while loading.Please reload this page.
First tool for projects V2.
Please note that part of this functionality is copy-paste of the relevant code in google/go-github that will be removed once we are able to merge pull requests there.
Implementsgoogle/go-github#3715