Skip to content

Conversation

JoannaaKL
Copy link
Contributor

@JoannaaKL JoannaaKL commented Sep 22, 2025

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.
Implements google/go-github#3715

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 14:01
@JoannaaKL JoannaaKL requested a review from a team as a code owner September 22, 2025 14:01
Copy link
Contributor

@Copilot Copilot AI left a 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 or learn 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"
Copy link

Copilot AI Sep 22, 2025

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.

Copy link
Contributor Author

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.

@JoannaaKL JoannaaKL changed the title Add projects Add ListProjects tool Sep 22, 2025
@JoannaaKL JoannaaKL merged commit 23630b3 into main Sep 22, 2025
16 checks passed
@JoannaaKL JoannaaKL deleted the add-projects branch September 22, 2025 14:48
nickytonline pushed a commit to nickytonline/github-mcp-http that referenced this pull request Oct 4, 2025
* Bump go-viper/mapstructure

* Update github.com/go-viper/mapstructure/v2 version in licenses

* Add tool to list projects

* Fix ordering
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.

2 participants