Add support for org-level discussions in list_discussions tool#775
Merged
tommaso-moro merged 5 commits intogithub:mainfrom Jul 29, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for organization-level discussions to the existing list_discussions tool by making the repo parameter optional and defaulting to .github when not provided.
- Made the
repoparameter optional in thelist_discussionstool - Updated tool descriptions to reflect support for both repository and organization-level discussions
- Added comprehensive test coverage for organization-level discussion scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/github/discussions.go | Made repo parameter optional and added logic to default to .github for org-level discussions |
| pkg/github/discussions_test.go | Added test data and test case for organization-level discussions |
| README.md | Updated documentation to reflect the optional nature of the repo parameter |
LuluBeatson
approved these changes
Jul 29, 2025
MayorFaj
pushed a commit
to MayorFaj/github-mcp-server
that referenced
this pull request
Jul 29, 2025
…b#775) * make repo optional, and default to .github when not provided. improve tool description * autogen * update tests * small copy paste error fixes
mattdholloway
added a commit
that referenced
this pull request
Jul 31, 2025
* 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>
This was referenced Aug 4, 2025
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
…b#775) * make repo optional, and default to .github when not provided. improve tool description * autogen * update tests * small copy paste error fixes
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
* 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 (github#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 (github#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Overview
This PR adds support for org-level discussions to the
list_discussions, thus closing issue #671For the sake of not bloating the MCP with too many (similar) tools, I made the design decision to update the existing
list_discussionstool to add support for org-level discussions: if arepois provided, the repo-level discussions are queried, otherwise the org-level discussions are.Changes
repoparameter is made optional. When it is not passed,repowill be set to.githubwhich will query discussions at the organisation level. (This is because organization discussions appear to be stored in a special.githubrepository within the organization).Screenshots




