Skip to content

Commit 4bef534

Browse files
authored
Update repositories.go
Update params
1 parent c6e0983 commit 4bef534

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pkg/github/repositories.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ func ListReleases(getClient GetClientFn, t translations.TranslationHelperFunc) (
13271327
mcp.WithDescription(t("TOOL_LIST_RELEASES_DESCRIPTION", "List releases in a GitHub repository")),
13281328
mcp.WithToolAnnotation(mcp.ToolAnnotation{
13291329
Title: t("TOOL_LIST_RELEASES_USER_TITLE", "List releases"),
1330-
ReadOnlyHint: toBoolPtr(true),
1330+
ReadOnlyHint: ToBoolPtr(true),
13311331
}),
13321332
mcp.WithString("owner",
13331333
mcp.Required(),
@@ -1340,11 +1340,11 @@ func ListReleases(getClient GetClientFn, t translations.TranslationHelperFunc) (
13401340
WithPagination(),
13411341
),
13421342
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
1343-
owner, err := requiredParam[string](request, "owner")
1343+
owner, err := RequiredParam[string](request, "owner")
13441344
if err != nil {
13451345
return mcp.NewToolResultError(err.Error()), nil
13461346
}
1347-
repo, err := requiredParam[string](request, "repo")
1347+
repo, err := RequiredParam[string](request, "repo")
13481348
if err != nil {
13491349
return mcp.NewToolResultError(err.Error()), nil
13501350
}
@@ -1354,8 +1354,8 @@ func ListReleases(getClient GetClientFn, t translations.TranslationHelperFunc) (
13541354
}
13551355

13561356
opts := &github.ListOptions{
1357-
Page: pagination.page,
1358-
PerPage: pagination.perPage,
1357+
Page: pagination.Page,
1358+
PerPage: pagination.PerPage,
13591359
}
13601360

13611361
client, err := getClient(ctx)
@@ -1392,7 +1392,7 @@ func GetLatestRelease(getClient GetClientFn, t translations.TranslationHelperFun
13921392
mcp.WithDescription(t("TOOL_GET_LATEST_RELEASE_DESCRIPTION", "Get the latest release in a GitHub repository")),
13931393
mcp.WithToolAnnotation(mcp.ToolAnnotation{
13941394
Title: t("TOOL_GET_LATEST_RELEASE_USER_TITLE", "Get latest release"),
1395-
ReadOnlyHint: toBoolPtr(true),
1395+
ReadOnlyHint: ToBoolPtr(true),
13961396
}),
13971397
mcp.WithString("owner",
13981398
mcp.Required(),
@@ -1404,11 +1404,11 @@ func GetLatestRelease(getClient GetClientFn, t translations.TranslationHelperFun
14041404
),
14051405
),
14061406
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
1407-
owner, err := requiredParam[string](request, "owner")
1407+
owner, err := RequiredParam[string](request, "owner")
14081408
if err != nil {
14091409
return mcp.NewToolResultError(err.Error()), nil
14101410
}
1411-
repo, err := requiredParam[string](request, "repo")
1411+
repo, err := RequiredParam[string](request, "repo")
14121412
if err != nil {
14131413
return mcp.NewToolResultError(err.Error()), nil
14141414
}
@@ -1439,6 +1439,7 @@ func GetLatestRelease(getClient GetClientFn, t translations.TranslationHelperFun
14391439

14401440
return mcp.NewToolResultText(string(r)), nil
14411441
}
1442+
}
14421443

14431444
// filterPaths filters the entries in a GitHub tree to find paths that
14441445
// match the given suffix.

0 commit comments

Comments
 (0)