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

feat: add list repository contributors and update readme#893

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

Open
beccccaboo wants to merge6 commits intogithub:main
base:main
Choose a base branch
Loading
frombeccccaboo:feature/add-list-repository-contributors

Conversation

beccccaboo
Copy link
Contributor

@beccccaboobeccccaboo commentedAug 15, 2025
edited
Loading

Closes#825
Closes#876

This PR adds a newlist_repository_contributors tool to the GitHub MCP Server.

What's New (for#825)

  • New Tool: list_repository_contributors - Lists contributors for a GitHub repository
  • API Endpoint: Implements GET /repos/{owner}/{repo}/contributorsREST API

What's New (for#876)
Refer the correct installation index in README.md

@beccccaboobeccccaboo requested a review froma team as acode ownerAugust 15, 2025 19:46
@CopilotCopilotAI review requested due to automatic review settingsAugust 15, 2025 19:46
Copilot

This comment was marked as outdated.

@beccccaboobeccccaboo changed the titleFeature/add list repository contributorsfeat: add list repository contributors and update readmeAug 15, 2025
beccccabooand others added2 commitsAugust 15, 2025 12:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@CopilotCopilotAI review requested due to automatic review settingsSeptember 4, 2025 04:48
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 a new GitHub API tool for listing repository contributors and fixes a README reference. The main focus is implementing thelist_repository_contributors tool that interfaces with GitHub's REST API to retrieve contributor information for repositories.

  • Implements a newlist_repository_contributors tool with pagination support
  • Adds comprehensive test coverage for the new functionality
  • Updates README documentation to include the new tool
  • Corrects a README reference issue

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
script/list-repository-contributorsTest script for the new contributors tool
pkg/github/tools.goRegisters the new tool in the default toolset
pkg/github/repositories_test.goComprehensive test cases for the contributors functionality
pkg/github/repositories.goCore implementation of the contributors listing tool
pkg/github/toolsnaps/list_repository_contributors.snapTool schema snapshot for testing
README.mdDocumentation update for the new tool

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Comment on lines +256 to +263
ifresp.StatusCode!=http.StatusOK {
body,err:=io.ReadAll(resp.Body)
iferr!=nil {
returnnil,fmt.Errorf("failed to read response body: %w",err)
}
returnmcp.NewToolResultError(fmt.Sprintf("failed to list contributors: %s",string(body))),nil
}

Copy link
Preview

CopilotAISep 4, 2025

Choose a reason for hiding this comment

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

The status code check and error handling is redundant since the GitHub client API call already handles HTTP errors. This pattern differs from other similar functions in the codebase likeListCommits andListBranches where the status check is performed after confirming no API error occurred. Consider removing lines 256-262 to maintain consistency.

Suggested change
ifresp.StatusCode!= http.StatusOK {
body,err:=io.ReadAll(resp.Body)
iferr!=nil {
returnnil,fmt.Errorf("failed to read response body: %w",err)
}
returnmcp.NewToolResultError(fmt.Sprintf("failed to list contributors: %s",string(body))),nil
}

Copilot uses AI. Check for mistakes.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

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

Successfully merging this pull request may close these issues.

Add support for list_repository_contributors 404 error
1 participant
@beccccaboo

[8]ページ先頭

©2009-2025 Movatter.jp