Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1cb52f9

Browse files
committed
not needed in handler func
1 parent 383c2d2 commit 1cb52f9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/github/repository_resource.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func getRepositoryContent(client *github.Client, t translations.TranslationHelpe
1919
"repo://{owner}/{repo}/contents{/path*}", // Resource template
2020
t("RESOURCE_REPOSITORY_CONTENT_DESCRIPTION", "Repository Content"),
2121
),
22-
handlerFunc(client, t)
22+
handlerFunc(client)
2323
}
2424

2525
// getRepositoryContent defines the resource template and handler for the Repository Content API.
@@ -28,7 +28,7 @@ func getRepositoryBranchContent(client *github.Client, t translations.Translatio
2828
"repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*}", // Resource template
2929
t("RESOURCE_REPOSITORY_CONTENT_BRANCH_DESCRIPTION", "Repository Content for specific branch"),
3030
),
31-
handlerFunc(client, t)
31+
handlerFunc(client)
3232
}
3333

3434
// getRepositoryContent defines the resource template and handler for the Repository Content API.
@@ -37,7 +37,7 @@ func getRepositoryCommitContent(client *github.Client, t translations.Translatio
3737
"repo://{owner}/{repo}/sha/{sha}/contents{/path*}", // Resource template
3838
t("RESOURCE_REPOSITORY_CONTENT_COMMIT_DESCRIPTION", "Repository Content for specific commit"),
3939
),
40-
handlerFunc(client, t)
40+
handlerFunc(client)
4141
}
4242

4343
// getRepositoryContent defines the resource template and handler for the Repository Content API.
@@ -46,7 +46,7 @@ func getRepositoryTagContent(client *github.Client, t translations.TranslationHe
4646
"repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*}", // Resource template
4747
t("RESOURCE_REPOSITORY_CONTENT_TAG_DESCRIPTION", "Repository Content for specific tag"),
4848
),
49-
handlerFunc(client, t)
49+
handlerFunc(client)
5050
}
5151

5252
// getRepositoryContent defines the resource template and handler for the Repository Content API.
@@ -55,10 +55,10 @@ func getRepositoryPrContent(client *github.Client, t translations.TranslationHel
5555
"repo://{owner}/{repo}/refs/pull/{pr_number}/head/contents{/path*}", // Resource template
5656
t("RESOURCE_REPOSITORY_CONTENT_PR_DESCRIPTION", "Repository Content for specific pull request"),
5757
),
58-
handlerFunc(client, t)
58+
handlerFunc(client)
5959
}
6060

61-
func handlerFunc(client *github.Client, _ translations.TranslationHelperFunc) func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) {
61+
func handlerFunc(client *github.Client) func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) {
6262
return func(ctx context.Context, request mcp.ReadResourceRequest) ([]mcp.ResourceContents, error) { // Extract parameters from request.Params.URI
6363

6464
owner := request.Params.Arguments["owner"].([]string)[0]

0 commit comments

Comments
 (0)