Add GitHub Discussions Support to MCP Server #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User description
This pull request implements GitHub Discussions support in the GitHub MCP server, addressing issue github#213. The new functionality allows LLMs to interact with discussions in GitHub repositories, enhancing community engagement.
Changes Made:
ListDiscussions
: Lists discussions in a repository with filtering options.GetDiscussion
: Retrieves details of a specific discussion.GetDiscussionCategories
: Fetches discussion categories in a repository.GetDiscussionComments
: Gets comments for a specific discussion.AddDiscussionComment
: Adds a comment to a discussion.CreateDiscussion
: Creates a new discussion in a repository.Testing:
This enhancement will significantly benefit community-driven repositories by providing a reliable way for LLMs to interact with discussions.
Original Task: github-mcp-server/9302sccg5r2c
Author: Aziz Alzahrani
PR Type
Enhancement, Tests
Description
Added GitHub Discussions tools for repository interaction.
Integrated tools into the server with conditional read-only checks.
Comprehensive test coverage for all tools and scenarios.
Changes walkthrough 📝
discussions.go
Implement GitHub Discussions tools
pkg/github/discussions.go
discussions.
server.go
Integrate GitHub Discussions tools into server
pkg/github/server.go
discussions_test.go
Add tests for GitHub Discussions tools
pkg/github/discussions_test.go