Skip to content

feat: Add support for Git tag operations #345

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 30, 2025
Merged

Conversation

eranco74
Copy link
Contributor

@eranco74 eranco74 commented Apr 24, 2025

Add git tag functionality, including:
- List repository tags
- Get tag details
- Support for tag-based content access

This enables basic read-only tag management through the MCP server API.

Closes: #344
Screenshot From 2025-04-24 20-11-21
Screenshot From 2025-04-24 19-59-40

image

@eranco74 eranco74 requested a review from a team as a code owner April 24, 2025 17:28
@eranco74
Copy link
Contributor Author

@williammartin @SamMorrowDrums PTAL

Copy link
Collaborator

@williammartin williammartin left a comment

Choose a reason for hiding this comment

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

New e2e test passes.

➜  github-mcp-server git:(tags) GITHUB_MCP_SERVER_E2E_TOKEN=$(gh auth token) go test -v -count=1 --run "TestTags" --tags e2e ./e2e

=== RUN   TestTags
    e2e_test.go:45: Building Docker image for e2e tests...
    e2e_test.go:118: Starting Stdio MCP client...
    e2e_test.go:219: Getting current user...
    e2e_test.go:248: Creating repository williammartin/github-mcp-server-e2e-TestTags-1746011927745...
    e2e_test.go:265: Creating tag williammartin/github-mcp-server-e2e-TestTags-1746011927745:v0.0.1...
    e2e_test.go:295: Listing tags for williammartin/github-mcp-server-e2e-TestTags-1746011927745...
    e2e_test.go:328: Getting tag williammartin/github-mcp-server-e2e-TestTags-1746011927745:v0.0.1...
    e2e_test.go:257: Deleting repository williammartin/github-mcp-server-e2e-TestTags-1746011927745...
--- PASS: TestTags (56.03s)
PASS
ok      github.com/github/github-mcp-server/e2e 56.424s

juruen
juruen previously approved these changes Apr 30, 2025
Copy link
Collaborator

@juruen juruen left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

I'm pretty happy to see the progress in making our tests more thorough!

SamMorrowDrums
SamMorrowDrums previously approved these changes Apr 30, 2025
Copy link
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

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

Very nice work. A couple of notes on being explicit that this exposes the concept of git tags, but I am certain it would have worked well either way. I just want to make sure for operations using the returned tags the fact they are git tags is always obvious to the model.

@@ -10,6 +10,15 @@ import (
"github.com/stretchr/testify/require"
)

// expectPath is a helper function to create a partial mock that expects a
// request with the given path, with the ability to chain a response handler.
func expectPath(t *testing.T, expectedPath string) *partialMock {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like expect path. I think it will catch both errors matching args into API requests and protect from regressions also.

GitHub API is very stable and I don't expect much maintenance will be required.

eranco74 and others added 3 commits April 30, 2025 19:18
Add git tag functionality including:
- List repository tags
- Get tag details
- Support for tag-based content access

This enables basic read-only tag management through the MCP server API.
Copy link
Collaborator

@SamMorrowDrums SamMorrowDrums left a comment

Choose a reason for hiding this comment

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

🚀

@SamMorrowDrums SamMorrowDrums merged commit 92d95e4 into github:main Apr 30, 2025
9 checks passed
Sign up for free to 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.

Add support for tags operations
4 participants