#8 Feature: Collaborators support

Gesloten
9 maanden geleden werd geopend door claude · 2 opmerkingen

Description

Add support for Gogs Collaborators functionality to the MCP server.

Why This Feature?

Necessary for repository access management - allows managing who can contribute to repositories.

Requirements

  • Implement list_collaborators tool
  • Implement check_collaborator tool
  • Implement add_collaborator tool
  • Implement remove_collaborator tool
  • Add proper TypeScript types for Collaborator objects
  • Update documentation with usage examples

Related

Requested by @fszontagh in #4

API Reference

See Gogs API documentation for collaborators endpoints.

## Description Add support for Gogs Collaborators functionality to the MCP server. ## Why This Feature? Necessary for repository access management - allows managing who can contribute to repositories. ## Requirements - Implement `list_collaborators` tool - Implement `check_collaborator` tool - Implement `add_collaborator` tool - Implement `remove_collaborator` tool - Add proper TypeScript types for Collaborator objects - Update documentation with usage examples ## Related Requested by @fszontagh in #4 ## API Reference See Gogs API documentation for collaborators endpoints.

@fszontagh I am starting work on this issue now! I will implement the four collaborator tools (list, check, add, remove) along with proper TypeScript types and documentation updates.

Plan:

  1. Add GogsCollaborator type definition
  2. Implement client methods in gogs-client.ts
  3. Add MCP tool schemas and handlers in server.ts
  4. Update README.md and CLAUDE.md with new tools
  5. Test and commit changes

Expected to complete within this session.

@fszontagh I am starting work on this issue now! I will implement the four collaborator tools (list, check, add, remove) along with proper TypeScript types and documentation updates. **Plan:** 1. Add `GogsCollaborator` type definition 2. Implement client methods in `gogs-client.ts` 3. Add MCP tool schemas and handlers in `server.ts` 4. Update README.md and CLAUDE.md with new tools 5. Test and commit changes Expected to complete within this session.

✅ Implementation Complete

I have successfully implemented the Collaborator Management functionality for the Gogs MCP server.

What was implemented:

1. TypeScript Types (src/types.ts)

  • Added GogsCollaborator interface with user details and permission fields (admin, push, pull)

2. Client Methods (src/gogs-client.ts)

  • listCollaborators(owner, repo) - List all collaborators for a repository
  • checkCollaborator(owner, repo, username) - Check if a user is a collaborator (returns boolean)
  • addCollaborator(owner, repo, username, permission?) - Add user with read/write/admin permissions (default: write)
  • removeCollaborator(owner, repo, username) - Remove collaborator access

3. MCP Tools (src/server.ts)

  • list_collaborators - Returns array of collaborator objects with permissions
  • check_collaborator - Returns boolean with repository context
  • add_collaborator - Adds collaborator with success message
  • remove_collaborator - Removes collaborator with success message

4. Documentation Updates

  • README.md: Added new "Collaborator Management Tools" section with full parameter documentation
  • README.md: Removed Collaborators from "Documented but Not Yet Implemented" table
  • CLAUDE.md: Added Collaborator Management to MCP Tool Categories list

Testing:

  • ✅ TypeScript compilation successful
  • ✅ All changes committed and pushed to repository
  • ✅ Code follows project conventions and patterns
  • ✅ Documentation is complete and consistent

Commit:

Commit 68de2eb: feat: add Collaborator Management support #8

Ready for use!

The collaborator management tools are now available in the MCP server and ready to be used for managing repository access.

## ✅ Implementation Complete I have successfully implemented the Collaborator Management functionality for the Gogs MCP server. ### What was implemented: #### 1. **TypeScript Types** (`src/types.ts`) - Added `GogsCollaborator` interface with user details and permission fields (admin, push, pull) #### 2. **Client Methods** (`src/gogs-client.ts`) - `listCollaborators(owner, repo)` - List all collaborators for a repository - `checkCollaborator(owner, repo, username)` - Check if a user is a collaborator (returns boolean) - `addCollaborator(owner, repo, username, permission?)` - Add user with read/write/admin permissions (default: write) - `removeCollaborator(owner, repo, username)` - Remove collaborator access #### 3. **MCP Tools** (`src/server.ts`) - `list_collaborators` - Returns array of collaborator objects with permissions - `check_collaborator` - Returns boolean with repository context - `add_collaborator` - Adds collaborator with success message - `remove_collaborator` - Removes collaborator with success message #### 4. **Documentation Updates** - **README.md**: Added new "Collaborator Management Tools" section with full parameter documentation - **README.md**: Removed Collaborators from "Documented but Not Yet Implemented" table - **CLAUDE.md**: Added Collaborator Management to MCP Tool Categories list ### Testing: - ✅ TypeScript compilation successful - ✅ All changes committed and pushed to repository - ✅ Code follows project conventions and patterns - ✅ Documentation is complete and consistent ### Commit: Commit `68de2eb`: feat: add Collaborator Management support #8 ### Ready for use! The collaborator management tools are now available in the MCP server and ready to be used for managing repository access.
Sign in to join this conversation.
Geen mijlpaal
Geen verantwoordelijke
1 deelnemers
Laden...
Annuleren
Opslaan
Er is nog geen inhoud.