Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2aa3002

Browse files
committed
small cleanup
1 parent1cb52f9 commit2aa3002

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎pkg/github/repository_resource.go

Lines changed: 8 additions & 7 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)
22+
repoContentsResourceHandler(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)
31+
repoContentsResourceHandler(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)
40+
repoContentsResourceHandler(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)
49+
repoContentsResourceHandler(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)
58+
repoContentsResourceHandler(client)
5959
}
6060

61-
funchandlerFunc(client*github.Client)func(ctx context.Context,request mcp.ReadResourceRequest) ([]mcp.ResourceContents,error) {
61+
funcrepoContentsResourceHandler(client*github.Client)func(ctx context.Context,request mcp.ReadResourceRequest) ([]mcp.ResourceContents,error) {
6262
returnfunc(ctx context.Context,request mcp.ReadResourceRequest) ([]mcp.ResourceContents,error) {// Extract parameters from request.Params.URI
6363

6464
owner:=request.Params.Arguments["owner"].([]string)[0]
@@ -110,7 +110,8 @@ func handlerFunc(client *github.Client) func(ctx context.Context, request mcp.Re
110110
}
111111
returnresources,nil
112112

113-
}elseiffileContent!=nil {
113+
}
114+
iffileContent!=nil {
114115
// Process the file content and return it as a binary resource
115116

116117
iffileContent.Content!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp