Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

tommaso-moro
Copy link
Contributor

@tommaso-morotommaso-moro commentedJul 28, 2025
edited
Loading

Overview

This PR adds support for org-level discussions to thelist_discussions, thus closing issue#671

For the sake of not bloating the MCP with too many (similar) tools, I made the design decision to update the existinglist_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

  • Therepo 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).
  • The tool descriptions are updated to accommodate for the above change
  • The tests are updated to test for the scenario where the tool is used to query org-level discussions

Screenshots
Screenshot 2025-07-28 at 16 44 41
Screenshot 2025-07-28 at 16 45 02
Screenshot 2025-07-28 at 16 47 09
Screenshot 2025-07-28 at 18 15 54
Screenshot 2025-07-28 at 18 16 18

@tommaso-morotommaso-moro marked this pull request as ready for reviewJuly 29, 2025 11:00
@CopilotCopilotAI review requested due to automatic review settingsJuly 29, 2025 11:00
@tommaso-morotommaso-moro requested a review froma team as acode ownerJuly 29, 2025 11:00
Copy link
Contributor

@CopilotCopilotAI 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 adds support for organization-level discussions to the existinglist_discussions tool by making therepo parameter optional and defaulting to.github when not provided.

  • Made therepo 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.

FileDescription
pkg/github/discussions.goMaderepo parameter optional and added logic to default to.github for org-level discussions
pkg/github/discussions_test.goAdded test data and test case for organization-level discussions
README.mdUpdated documentation to reflect the optional nature of therepo parameter

@tommaso-morotommaso-moro marked this pull request as draftJuly 29, 2025 11:01
Copy link
Contributor

@LuluBeatsonLuluBeatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice one! Good to add this functionality to the existing list_discussions tool.

Example
List discussions in the modelcontextprotocol org. Get the last 5 sorted by updated time
image

tommaso-moro reacted with rocket emoji
@tommaso-morotommaso-moro merged commit89e3afd intogithub:mainJul 29, 2025
10 checks passed
MayorFaj pushed a commit to MayorFaj/github-mcp-server that referenced this pull requestJul 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 requestJul 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>
nickytonline pushed a commit to nickytonline/github-mcp-http that referenced this pull requestOct 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 requestOct 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>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@LuluBeatsonLuluBeatsonLuluBeatson approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@tommaso-moro@LuluBeatson

[8]ページ先頭

©2009-2025 Movatter.jp