github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

feat: Adds complete label management functionality

Open clafollett opened this issue 8 months ago • 3 comments

Description

This PR adds comprehensive label management functionality to the GitHub MCP server, enabling users to effectively manage repository labels directly through the MCP tools.

Features Added

This implementation provides a complete set of tools for label management:

  • List Labels: Retrieve all labels in a repository
  • Get Label: Fetch details of a specific label
  • Create Label: Create new repository labels with custom names, colors, and descriptions
  • Update Label: Modify existing labels (name, color, description)
  • Delete Label: Remove labels from a repository
  • List Labels for Issue: Retrieve all labels applied to a specific issue
  • Add Labels to Issue: Apply multiple labels to an issue
  • Remove Label from Issue: Remove a label from an issue

Implementation Details

  • Added proper parameter validation for all label operations
  • Implemented comprehensive test coverage with various test cases
  • Ensured compatibility with existing GitHub MCP server architecture
  • Added appropriate documentation for all tools

Testing

All functionality has been thoroughly tested with both unit tests and manual verification against the GitHub API.

Notes for Reviewers

  • The implementation follows the same patterns used in other GitHub MCP server tools
  • Error handling follows established conventions in the codebase
  • All tests are passing in both the test suite and with real API calls

Closes: #312

clafollett avatar Apr 18 '25 23:04 clafollett

This is a month old and I really need this label feature for my triage agent I am building. Is there anything I can do to help get this merged soon?

mattleibow avatar May 23 '25 17:05 mattleibow

This is a month old and I really need this label feature for my triage agent I am building. Is there anything I can do to help get this merged soon?

I appreciate your support on this ticket. I still use my personal fork locally and allow my agent to tag based on components and other things along with colors and descriptions. This allows for label management before or after the fact. I didn't like the only tagging I could do through creating a ticket was to was a single name with no other tagging details. Looking at the details of those code paths, there is no way to pass any more than a name to the underlying functions. So I vibe coded this solution. Works pretty well for me so far!

clafollett avatar May 24 '25 00:05 clafollett

Just want to say that I would like this feature as well. Current workaround is to have my agent use the GitHub CLI instead, but not all the devs in my org have that set up so I can't be sure adding instructions to add/read/search labels to our workspaces will actually get Copilot to do that.

arriqs avatar Aug 14 '25 19:08 arriqs