Skip to content

Add support for retrieving GitHub Issue Comments - #106

Merged
juruen merged 4 commits into
github:mainfrom
almostwhitehat:add-issue-comments-tool
Apr 7, 2025
Merged

Add support for retrieving GitHub Issue Comments#106
juruen merged 4 commits into
github:mainfrom
almostwhitehat:add-issue-comments-tool

Conversation

@almostwhitehat

Copy link
Copy Markdown
Contributor

Add new tool 'get_issue_comments' that allows fetching comments associated with GitHub issues. This complements the existing issue retrieval functionality and follows the same patterns as the pull request comments implementation.

The implementation includes:

  • New getIssueComments function in pkg/github/issues.go
  • Tool registration in server.go
  • Comprehensive test coverage in issues_test.go

Add new tool 'get_issue_comments' that allows fetching comments associated
with GitHub issues. This complements the existing issue retrieval functionality
and follows the same patterns as the pull request comments implementation.
The implementation includes:
- New getIssueComments function in pkg/github/issues.go
- Tool registration in server.go
- Comprehensive test coverage in issues_test.go

@juruenjuruen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

First of all, thank you so much for your contribution!

This is looking good, I just added a comment about adding proper pagination support.

Comment threadpkg/github/issues.go
Comment on lines +631 to +635
opts := &github.IssueListCommentsOptions{
ListOptions: github.ListOptions{
PerPage: 100,
},
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please, let's add proper support for pagination. That is, let's make the tool take page, and perPage. Take a look at listCommits if you want to see an example.

To be consistent, use 30 as the default page size.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

🤦 Great catch - I added pagination with a default perPage of 30, and added tests for it!

@juruenjuruen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great, thank so much for your work here! 🚀

@juruen
juruen merged commit c77ea94 into github:mainApr 7, 2025
DaleSeo pushed a commit to DaleSeo/github-mcp-server that referenced this pull request Oct 24, 2025
Sign up for freeto 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

@almostwhitehat@juruen