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:
Lunny Xiao
2026-08-23 23:27:34 -07:00
parent 815a0e26aa
commit bfc1ff17da
3 changed files with 63 additions and 6 deletions
+4
View File
@@ -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))