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

@JoannaaKL JoannaaKL 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 owner May 14, 2026 10:26
Copilot AI review requested due to automatic review settings May 14, 2026 10:26

Copilot AI 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
File Description
pkg/github/repositories.go Implements ListRepositoryCollaborators tool handler.
pkg/github/tools.go Registers the new tool in AllTools.
pkg/github/minimal_types.go Adds MinimalCollaborator struct for trimmed output.
pkg/github/toolsnaps/list_repository_collaborators.snap Snapshot of the new tool schema.
pkg/github/repositories_test.go Adds schema and behavioral tests for the new tool.
README.md Documents the new tool.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 1
Comment thread pkg/github/repositories.go Outdated
@JoannaaKL JoannaaKL force-pushed the add-repo-collaborators branch from 0c7c819 to 2a66879 Compare May 14, 2026 10:48
Comment thread pkg/github/repositories.go Outdated
@JoannaaKL JoannaaKL requested a review from RossTarrant May 14, 2026 12:27
RossTarrant
RossTarrant previously approved these changes May 15, 2026

@RossTarrant RossTarrant 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 main May 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants