Skip to content

Add tool to list repo collaborators - #2477

Merged
JoannaaKL merged 8 commits into
mainfrom
add-repo-collaborators
May 15, 2026
Merged

Add tool to list repo collaborators#2477
JoannaaKL merged 8 commits into
mainfrom
add-repo-collaborators

Conversation

@JoannaaKL

@JoannaaKLJoannaaKL commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add new tool list_repository_collaborators. It uses REST API endpoint endpoint.

Why

It will enable more fine - grained visibility into repo settings.

What changed

  • new tool list_repository_collaborators added

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@JoannaaKL
JoannaaKL marked this pull request as ready for review May 14, 2026 10:26
@JoannaaKL
JoannaaKL requested a review from a team as a code ownerMay 14, 2026 10:26
CopilotAI review requested due to automatic review settings May 14, 2026 10:26

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new read-only MCP tool list_repository_collaborators that wraps the GitHub REST endpoint for listing repository collaborators, returning a minimal output (login, ID, role name) and supporting an optional affiliation filter plus standard pagination. Implementation follows the existing tool patterns in pkg/github/repositories.go.

Changes:

  • New tool ListRepositoryCollaborators registered in AllTools under the Repos toolset.
  • New MinimalCollaborator output type and corresponding toolsnap, table-driven tests, and README entry.
  • Required repo scope; supports affiliation (outside/direct/all) and pagination params.
Show a summary per file
FileDescription
pkg/github/repositories.goImplements ListRepositoryCollaborators tool handler.
pkg/github/tools.goRegisters the new tool in AllTools.
pkg/github/minimal_types.goAdds MinimalCollaborator struct for trimmed output.
pkg/github/toolsnaps/list_repository_collaborators.snapSnapshot of the new tool schema.
pkg/github/repositories_test.goAdds schema and behavioral tests for the new tool.
README.mdDocuments the new tool.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 1

Comment threadpkg/github/repositories.go Outdated
@JoannaaKL
JoannaaKLforce-pushed the add-repo-collaborators branch from 0c7c819 to 2a66879CompareMay 14, 2026 10:48
Comment threadpkg/github/repositories.go Outdated
RossTarrant
RossTarrant previously approved these changes May 15, 2026

@RossTarrantRossTarrant left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

@JoannaaKL
JoannaaKL merged commit 46d220f into mainMay 15, 2026
18 checks passed
@JoannaaKL
JoannaaKL deleted the add-repo-collaborators branch May 15, 2026 09:20
SamMorrowDrums pushed a commit that referenced this pull request Jun 8, 2026
* Add tool to list repo collaborators
* Simplify tool description
* Fix test
* Return pagination info
* Return page parameters
* Update defaults
SamMorrowDrums pushed a commit that referenced this pull request Jun 8, 2026
* Add tool to list repo collaborators
* Simplify tool description
* Fix test
* Return pagination info
* Return page parameters
* Update defaults
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.

4 participants

@JoannaaKL@RossTarrant@SamMorrowDrums