Skip to content

Commit 4ac3230

Browse files
committed
refactor: Update function names to use consistent capitalization
1 parent 0ef1113 commit 4ac3230

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

pkg/github/repositories.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/mark3labs/mcp-go/server"
1414
)
1515

16-
// listCommits creates a tool to get commits of a branch in a repository.
17-
func listCommits(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
16+
// ListCommits creates a tool to get commits of a branch in a repository.
17+
func ListCommits(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
1818
return mcp.NewTool("list_commits",
1919
mcp.WithDescription(t("TOOL_LIST_COMMITS_DESCRIPTION", "Get list of commits of a branch in a GitHub repository")),
2020
mcp.WithString("owner",
@@ -79,8 +79,8 @@ func listCommits(client *github.Client, t translations.TranslationHelperFunc) (t
7979
}
8080
}
8181

82-
// createOrUpdateFile creates a tool to create or update a file in a GitHub repository.
83-
func createOrUpdateFile(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
82+
// CreateOrUpdateFile creates a tool to create or update a file in a GitHub repository.
83+
func CreateOrUpdateFile(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
8484
return mcp.NewTool("create_or_update_file",
8585
mcp.WithDescription(t("TOOL_CREATE_OR_UPDATE_FILE_DESCRIPTION", "Create or update a single file in a GitHub repository")),
8686
mcp.WithString("owner",
@@ -180,8 +180,8 @@ func createOrUpdateFile(client *github.Client, t translations.TranslationHelperF
180180
}
181181
}
182182

183-
// createRepository creates a tool to create a new GitHub repository.
184-
func createRepository(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
183+
// CreateRepository creates a tool to create a new GitHub repository.
184+
func CreateRepository(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
185185
return mcp.NewTool("create_repository",
186186
mcp.WithDescription(t("TOOL_CREATE_REPOSITORY_DESCRIPTION", "Create a new GitHub repository in your account")),
187187
mcp.WithString("name",
@@ -246,8 +246,8 @@ func createRepository(client *github.Client, t translations.TranslationHelperFun
246246
}
247247
}
248248

249-
// getFileContents creates a tool to get the contents of a file or directory from a GitHub repository.
250-
func getFileContents(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
249+
// GetFileContents creates a tool to get the contents of a file or directory from a GitHub repository.
250+
func GetFileContents(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
251251
return mcp.NewTool("get_file_contents",
252252
mcp.WithDescription(t("TOOL_GET_FILE_CONTENTS_DESCRIPTION", "Get the contents of a file or directory from a GitHub repository")),
253253
mcp.WithString("owner",
@@ -315,8 +315,8 @@ func getFileContents(client *github.Client, t translations.TranslationHelperFunc
315315
}
316316
}
317317

318-
// forkRepository creates a tool to fork a repository.
319-
func forkRepository(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
318+
// ForkRepository creates a tool to fork a repository.
319+
func ForkRepository(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
320320
return mcp.NewTool("fork_repository",
321321
mcp.WithDescription(t("TOOL_FORK_REPOSITORY_DESCRIPTION", "Fork a GitHub repository to your account or specified organization")),
322322
mcp.WithString("owner",
@@ -378,8 +378,8 @@ func forkRepository(client *github.Client, t translations.TranslationHelperFunc)
378378
}
379379
}
380380

381-
// createBranch creates a tool to create a new branch.
382-
func createBranch(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
381+
// CreateBranch creates a tool to create a new branch.
382+
func CreateBranch(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
383383
return mcp.NewTool("create_branch",
384384
mcp.WithDescription(t("TOOL_CREATE_BRANCH_DESCRIPTION", "Create a new branch in a GitHub repository")),
385385
mcp.WithString("owner",
@@ -458,8 +458,8 @@ func createBranch(client *github.Client, t translations.TranslationHelperFunc) (
458458
}
459459
}
460460

461-
// pushFiles creates a tool to push multiple files in a single commit to a GitHub repository.
462-
func pushFiles(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
461+
// PushFiles creates a tool to push multiple files in a single commit to a GitHub repository.
462+
func PushFiles(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
463463
return mcp.NewTool("push_files",
464464
mcp.WithDescription(t("TOOL_PUSH_FILES_DESCRIPTION", "Push multiple files to a GitHub repository in a single commit")),
465465
mcp.WithString("owner",
@@ -601,8 +601,8 @@ func pushFiles(client *github.Client, t translations.TranslationHelperFunc) (too
601601
}
602602
}
603603

604-
// listBranches creates a tool to list branches in a repository.
605-
func listBranches(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
604+
// ListBranches creates a tool to list branches in a repository.
605+
func ListBranches(client *github.Client, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
606606
return mcp.NewTool("list_branches",
607607
mcp.WithDescription(t("TOOL_LIST_BRANCHES_DESCRIPTION", "List branches in a GitHub repository")),
608608
mcp.WithString("owner",

0 commit comments

Comments
 (0)