(ctx context.Context, deps ToolDependencies, args map[string]any, owner string)
| 379 | } |
| 380 | |
| 381 | func uiGetIssueFields(ctx context.Context, deps ToolDependencies, args map[string]any, owner string) (*mcp.CallToolResult, any, error) { |
| 382 | repo, err := RequiredParam[string](args, "repo") |
| 383 | if err != nil { |
| 384 | return utils.NewToolResultError(err.Error()), nil, nil |
| 385 | } |
| 386 | |
| 387 | gqlClient, err := deps.GetGQLClient(ctx) |
| 388 | if err != nil { |
| 389 | return utils.NewToolResultErrorFromErr("failed to get GitHub GraphQL client", err), nil, nil |
| 390 | } |
| 391 | |
| 392 | fields, err := fetchIssueFields(ctx, gqlClient, owner, repo) |
| 393 | if err != nil { |
| 394 | return ghErrors.NewGitHubGraphQLErrorResponse(ctx, "failed to list issue fields", err), nil, nil |
| 395 | } |
| 396 | |
| 397 | return marshalUIGetIssueFields(fields) |
| 398 | } |
| 399 | |
| 400 | func marshalUIGetIssueFields(fields []IssueField) (*mcp.CallToolResult, any, error) { |
| 401 | resultFields := make([]map[string]any, 0, len(fields)) |
no test coverage detected