mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2026-08-27 18:47:44 +00:00
feat(issue): add assigned_by filter to list_issues
Add an optional assigned_by parameter to the list_issues tool that maps to gitea_sdk.ListIssueOption.AssignedBy, and include assignees in the slim list_issues output for consistency with the single-issue view. Co-Authored-By: Codet <codet@commitgo.dev> (GPT-5-Codex)
This commit is contained in:
@@ -49,6 +49,7 @@ var (
|
||||
tool.Array("milestones", tool.Description("milestone name or ID filter"), tool.Items(map[string]any{"type": "string"})),
|
||||
tool.String("since", tool.Description("updated after ISO 8601")),
|
||||
tool.String("before", tool.Description("updated before ISO 8601")),
|
||||
tool.String("assigned_by", tool.Description("filter by the user who assigned the issue")),
|
||||
tool.Number("page", tool.Description(params.PageDesc), tool.Default(1)),
|
||||
tool.Number("per_page", tool.Description(params.PaginationDesc), tool.Default(30)),
|
||||
)
|
||||
@@ -204,6 +205,9 @@ func listRepoIssuesFn(ctx context.Context, args map[string]any) (*mcp.CallToolRe
|
||||
if t := params.GetOptionalTime(args, "before"); t != nil {
|
||||
opt.Before = *t
|
||||
}
|
||||
if assignedBy, ok := args["assigned_by"].(string); ok {
|
||||
opt.AssignedBy = assignedBy
|
||||
}
|
||||
client, err := gitea.ClientFromContext(ctx)
|
||||
if err != nil {
|
||||
return to.ErrorResult(fmt.Errorf("get gitea client err: %v", err))
|
||||
|
||||
Reference in New Issue
Block a user