@@ -13,53 +13,53 @@ import (
1313 "github.com/mark3labs/mcp-go/server"
1414)
1515
16- // getRepositoryContent defines the resource template and handler for the Repository Content API .
17- func getRepositoryContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
16+ // getRepositoryResourceContent defines the resource template and handler for getting repository content .
17+ func getRepositoryResourceContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
1818 return mcp .NewResourceTemplate (
1919 "repo://{owner}/{repo}/contents{/path*}" , // Resource template
2020 t ("RESOURCE_REPOSITORY_CONTENT_DESCRIPTION" , "Repository Content" ),
2121 ),
22- repoContentsResourceHandler (client )
22+ repositoryResourceContentsHandler (client )
2323}
2424
25- // getRepositoryContent defines the resource template and handler for the Repository Content API .
26- func getRepositoryBranchContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
25+ // getRepositoryContent defines the resource template and handler for getting repository content for a branch .
26+ func getRepositoryResourceBranchContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
2727 return mcp .NewResourceTemplate (
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- repoContentsResourceHandler (client )
31+ repositoryResourceContentsHandler (client )
3232}
3333
34- // getRepositoryContent defines the resource template and handler for the Repository Content API .
35- func getRepositoryCommitContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
34+ // getRepositoryResourceCommitContent defines the resource template and handler for getting repository content for a commit .
35+ func getRepositoryResourceCommitContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
3636 return mcp .NewResourceTemplate (
3737 "repo://{owner}/{repo}/sha/{sha}/contents{/path*}" , // Resource template
3838 t ("RESOURCE_REPOSITORY_CONTENT_COMMIT_DESCRIPTION" , "Repository Content for specific commit" ),
3939 ),
40- repoContentsResourceHandler (client )
40+ repositoryResourceContentsHandler (client )
4141}
4242
43- // getRepositoryContent defines the resource template and handler for the Repository Content API .
44- func getRepositoryTagContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
43+ // getRepositoryResourceTagContent defines the resource template and handler for getting repository content for a tag .
44+ func getRepositoryResourceTagContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
4545 return mcp .NewResourceTemplate (
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- repoContentsResourceHandler (client )
49+ repositoryResourceContentsHandler (client )
5050}
5151
52- // getRepositoryContent defines the resource template and handler for the Repository Content API .
53- func getRepositoryPrContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
52+ // getRepositoryResourcePrContent defines the resource template and handler for getting repository content for a pull request .
53+ func getRepositoryResourcePrContent (client * github.Client , t translations.TranslationHelperFunc ) (mcp.ResourceTemplate , server.ResourceTemplateHandlerFunc ) {
5454 return mcp .NewResourceTemplate (
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- repoContentsResourceHandler (client )
58+ repositoryResourceContentsHandler (client )
5959}
6060
61- func repoContentsResourceHandler (client * github.Client ) func (ctx context.Context , request mcp.ReadResourceRequest ) ([]mcp.ResourceContents , error ) {
62- return func (ctx context.Context , request mcp.ReadResourceRequest ) ([]mcp.ResourceContents , error ) { // Extract parameters from request.Params.URI
61+ func repositoryResourceContentsHandler (client * github.Client ) func (ctx context.Context , request mcp.ReadResourceRequest ) ([]mcp.ResourceContents , error ) {
62+ return func (ctx context.Context , request mcp.ReadResourceRequest ) ([]mcp.ResourceContents , error ) {
6363
6464 owner := request .Params .Arguments ["owner" ].([]string )[0 ]
6565 repo := request .Params .Arguments ["repo" ].([]string )[0 ]
0 commit comments