mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2026-08-28 02:57:44 +00:00
chore(deps): update dependencies (#243)
This PR contains the following updates: | Package | Type | Update | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) ([changelog](https://github.com/docker/setup-buildx-action/compare/bb05f3f5519dd87d3ba754cc423b652a5edd6d2c..37fe631027851001ddb9b187196cc803df7f5f0e)) | action | digest | `bb05f3f` → `37fe631` | | | | [go](https://go.dev/) ([source](https://github.com/golang/go)) | toolchain | minor | `1.26.6` → `1.27.0` |  |  | | golang.org/x/vuln | | minor | `v1.6.0` → `v1.7.0` |  |  | --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: silverwind <me@silverwind.io> Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/243 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
This commit is contained in:
@@ -148,7 +148,7 @@ func listRepoActionSecretsFn(ctx context.Context, args map[string]any) (*mcp.Cal
|
||||
}
|
||||
|
||||
secrets, _, err := client.Actions.ListRepoSecrets(ctx, owner, repo, gitea_sdk.ListRepoActionsSecretOption{
|
||||
ListOptions: gitea_sdk.ListOptions{Page: page, PageSize: pageSize},
|
||||
Page: page, PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list repo action secrets err: %v", err))
|
||||
@@ -228,7 +228,7 @@ func listOrgActionSecretsFn(ctx context.Context, args map[string]any) (*mcp.Call
|
||||
}
|
||||
|
||||
secrets, _, err := client.Actions.ListOrgSecrets(ctx, org, gitea_sdk.ListOrgActionsSecretOption{
|
||||
ListOptions: gitea_sdk.ListOptions{Page: page, PageSize: pageSize},
|
||||
Page: page, PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list org action secrets err: %v", err))
|
||||
@@ -428,7 +428,7 @@ func listOrgActionVariablesFn(ctx context.Context, args map[string]any) (*mcp.Ca
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
}
|
||||
variables, _, err := client.Actions.ListOrgVariables(ctx, org, gitea_sdk.ListOrgActionsVariableOption{
|
||||
ListOptions: gitea_sdk.ListOptions{Page: page, PageSize: pageSize},
|
||||
Page: page, PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list org action variables err: %v", err))
|
||||
|
||||
@@ -187,10 +187,8 @@ func listRepoIssuesFn(ctx context.Context, args map[string]any) (*mcp.CallToolRe
|
||||
State: gitea_sdk.StateType(state),
|
||||
Labels: labels,
|
||||
Milestones: milestones,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
switch args["type"] {
|
||||
case "issues":
|
||||
|
||||
@@ -116,10 +116,8 @@ func listRepoLabelsFn(ctx context.Context, args map[string]any) (*mcp.CallToolRe
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
|
||||
opt := gitea_sdk.ListLabelsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -261,10 +259,8 @@ func listOrgLabelsFn(ctx context.Context, args map[string]any) (*mcp.CallToolRes
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
|
||||
opt := gitea_sdk.ListOrgLabelsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -134,12 +134,10 @@ func listMilestonesFn(ctx context.Context, args map[string]any) (*mcp.CallToolRe
|
||||
name := params.GetOptionalString(args, "name", "")
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
opt := gitea_sdk.ListMilestoneOption{
|
||||
State: gitea_sdk.StateType(state),
|
||||
Name: name,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
State: gitea_sdk.StateType(state),
|
||||
Name: name,
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -95,10 +95,8 @@ func notificationWriteFn(ctx context.Context, args map[string]any) (*mcp.CallToo
|
||||
func listNotificationsFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult, error) {
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
opt := gitea_sdk.ListNotificationOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
if status, ok := args["status"].(string); ok {
|
||||
opt.Status = []gitea_sdk.NotificationStatus{gitea_sdk.NotificationStatus(status)}
|
||||
|
||||
+6
-10
@@ -349,10 +349,8 @@ func listRepoPullRequestsFn(ctx context.Context, args map[string]any) (*mcp.Call
|
||||
State: gitea_sdk.StateType(state),
|
||||
Sort: sort,
|
||||
Milestone: milestone,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -509,10 +507,8 @@ func listPullRequestReviewsFn(ctx context.Context, args map[string]any) (*mcp.Ca
|
||||
}
|
||||
|
||||
reviews, _, err := client.PullRequests.ListPullReviews(ctx, owner, repo, index, gitea_sdk.ListPullReviewsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list reviews for %v/%v/pr/%v err: %v", owner, repo, index, err))
|
||||
@@ -578,7 +574,7 @@ func listPullRequestReviewCommentsFn(ctx context.Context, args map[string]any) (
|
||||
} else {
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
reviews, _, err := client.PullRequests.ListPullReviews(ctx, owner, repo, index, gitea_sdk.ListPullReviewsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{Page: page, PageSize: pageSize},
|
||||
Page: page, PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list reviews for %v/%v/pr/%v err: %v", owner, repo, index, err))
|
||||
@@ -1049,7 +1045,7 @@ func getPullRequestFilesFn(ctx context.Context, args map[string]any) (*mcp.CallT
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
}
|
||||
files, _, err := client.PullRequests.ListPullRequestFiles(ctx, owner, repo, index, gitea_sdk.ListPullRequestFilesOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{Page: page, PageSize: pageSize},
|
||||
Page: page, PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("get %v/%v/pr/%v files err: %v", owner, repo, index, err))
|
||||
|
||||
@@ -135,10 +135,8 @@ func ListBranchesFn(ctx context.Context, args map[string]any) (*mcp.CallToolResu
|
||||
}
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
opt := gitea_sdk.ListRepoBranchesOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -69,12 +69,10 @@ func ListRepoCommitsFn(ctx context.Context, args map[string]any) (*mcp.CallToolR
|
||||
sha, _ := args["sha"].(string)
|
||||
path, _ := args["path"].(string)
|
||||
opt := gitea_sdk.ListCommitOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
SHA: sha,
|
||||
Path: path,
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
SHA: sha,
|
||||
Path: path,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -266,11 +266,9 @@ func DeleteFileFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult
|
||||
return to.ErrorResult(err)
|
||||
}
|
||||
opt := gitea_sdk.DeleteFileOptions{
|
||||
FileOptions: gitea_sdk.FileOptions{
|
||||
Message: message,
|
||||
BranchName: branchName,
|
||||
},
|
||||
SHA: sha,
|
||||
Message: message,
|
||||
BranchName: branchName,
|
||||
SHA: sha,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -236,10 +236,8 @@ func ListReleasesFn(ctx context.Context, args map[string]any) (*mcp.CallToolResu
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
}
|
||||
releases, _, err := client.Releases.ListReleases(ctx, owner, repo, gitea_sdk.ListReleasesOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
IsDraft: params.GetOptionalBoolPtr(args, "is_draft"),
|
||||
IsPreRelease: params.GetOptionalBoolPtr(args, "is_pre_release"),
|
||||
})
|
||||
|
||||
@@ -170,10 +170,8 @@ func ForkRepoFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult,
|
||||
func ListMyReposFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult, error) {
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
opt := gitea_sdk.ListReposOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -194,10 +192,8 @@ func ListOrgReposFn(ctx context.Context, args map[string]any) (*mcp.CallToolResu
|
||||
}
|
||||
page, pageSize := params.GetPagination(args, 100)
|
||||
opt := gitea_sdk.ListOrgReposOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -185,10 +185,8 @@ func ListTagsFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult,
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
}
|
||||
tags, _, err := client.Repositories.ListRepoTags(ctx, owner, repo, gitea_sdk.ListRepoTagsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: int(page),
|
||||
PageSize: int(pageSize),
|
||||
},
|
||||
Page: int(page),
|
||||
PageSize: int(pageSize),
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list tags error: %v", err))
|
||||
|
||||
@@ -54,10 +54,8 @@ func GetRepoTreeFn(ctx context.Context, args map[string]any) (*mcp.CallToolResul
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
|
||||
opt := gitea_sdk.ListTreeOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
Ref: treeSHA,
|
||||
Recursive: recursive,
|
||||
}
|
||||
|
||||
+10
-18
@@ -102,11 +102,9 @@ func UsersFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult, err
|
||||
}
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
opt := gitea_sdk.SearchUsersOption{
|
||||
KeyWord: keyword,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
KeyWord: keyword,
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -133,10 +131,8 @@ func OrgTeamsFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult,
|
||||
opt := gitea_sdk.SearchTeamsOptions{
|
||||
Query: query,
|
||||
IncludeDescription: includeDescription,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -168,10 +164,8 @@ func ReposFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult, err
|
||||
IsArchived: params.GetOptionalBoolPtr(args, "isArchived"),
|
||||
Sort: sort,
|
||||
Order: order,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
@@ -192,11 +186,9 @@ func IssuesFn(ctx context.Context, args map[string]any) (*mcp.CallToolResult, er
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
|
||||
opt := gitea_sdk.ListIssueOption{
|
||||
KeyWord: query,
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
KeyWord: query,
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
if state, ok := args["state"].(string); ok {
|
||||
opt.State = gitea_sdk.StateType(state)
|
||||
|
||||
@@ -200,10 +200,8 @@ func listTrackedTimesFn(ctx context.Context, args map[string]any) (*mcp.CallTool
|
||||
}
|
||||
|
||||
times, _, err := client.Issues.ListIssueTrackedTimes(ctx, owner, repo, index, gitea_sdk.ListTrackedTimesOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list tracked times for %s/%s#%d err: %v", owner, repo, index, err))
|
||||
@@ -290,10 +288,8 @@ func listRepoTimesFn(ctx context.Context, args map[string]any) (*mcp.CallToolRes
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
}
|
||||
times, _, err := client.Issues.ListRepoTrackedTimes(ctx, owner, repo, gitea_sdk.ListTrackedTimesOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
})
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("list repo tracked times for %s/%s err: %v", owner, repo, err))
|
||||
|
||||
@@ -59,10 +59,8 @@ func GetUserOrgsFn(ctx context.Context, args map[string]any) (*mcp.CallToolResul
|
||||
page, pageSize := params.GetPagination(args, 30)
|
||||
|
||||
opt := gitea_sdk.ListOrgsOptions{
|
||||
ListOptions: gitea_sdk.ListOptions{
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
},
|
||||
Page: page,
|
||||
PageSize: pageSize,
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user