GranularUpdateIssueMilestone creates a tool to update an issue's milestone.
(t translations.TranslationHelperFunc)
| 467 | |
| 468 | // GranularUpdateIssueMilestone creates a tool to update an issue's milestone. |
| 469 | func GranularUpdateIssueMilestone(t translations.TranslationHelperFunc) inventory.ServerTool { |
| 470 | return issueUpdateTool(t, |
| 471 | "update_issue_milestone", |
| 472 | "Update the milestone of an existing issue.", |
| 473 | "Update Issue Milestone", |
| 474 | map[string]*jsonschema.Schema{ |
| 475 | "milestone": { |
| 476 | Type: "integer", |
| 477 | Description: "The milestone number to set on the issue", |
| 478 | Minimum: jsonschema.Ptr(1.0), |
| 479 | }, |
| 480 | }, |
| 481 | []string{"milestone"}, |
| 482 | func(args map[string]any) (*github.IssueRequest, error) { |
| 483 | milestone, err := RequiredInt(args, "milestone") |
| 484 | if err != nil { |
| 485 | return nil, err |
| 486 | } |
| 487 | return &github.IssueRequest{Milestone: &milestone}, nil |
| 488 | }, |
| 489 | ) |
| 490 | } |
| 491 | |
| 492 | // issueTypeWithIntent represents the object form of the issue type field, |
| 493 | // allowing a rationale, confidence level, and/or suggest flag to be sent alongside the type name. |