-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add support for org-level discussions in list_discussions tool #775
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for org-level discussions in list_discussions tool #775
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 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
repo
parameter optional in thelist_discussions
tool - 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 |
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.
…b#775) * make repo optional, and default to .github when not provided. improve tool description * autogen * update tests * small copy paste error fixes
* 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>
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_discussions
tool to add support for org-level discussions: if arepo
is provided, the repo-level discussions are queried, otherwise the org-level discussions are.Changes
repo
parameter is made optional. When it is not passed,repo
will be set to.github
which will query discussions at the organisation level. (This is because organization discussions appear to be stored in a special.github
repository within the organization).Screenshots




