UpdateIssueIssueType sets or clears the issue type on an issue. Pass an empty issueTypeID to clear the issue type.
(client *Client, hostname string, issueID string, issueTypeID string)
| 505 | // UpdateIssueIssueType sets or clears the issue type on an issue. Pass an |
| 506 | // empty issueTypeID to clear the issue type. |
| 507 | func UpdateIssueIssueType(client *Client, hostname string, issueID string, issueTypeID string) error { |
| 508 | type UpdateIssueIssueTypeInput struct { |
| 509 | IssueID githubv4.ID `json:"issueId"` |
| 510 | IssueTypeID *githubv4.ID `json:"issueTypeId"` |
| 511 | } |
| 512 | |
| 513 | var mutation struct { |
| 514 | UpdateIssueIssueType struct { |
| 515 | Issue struct { |
| 516 | ID string |
| 517 | } |
| 518 | } `graphql:"updateIssueIssueType(input: $input)"` |
| 519 | } |
| 520 | |
| 521 | var typeID *githubv4.ID |
| 522 | if issueTypeID != "" { |
| 523 | id := githubv4.ID(issueTypeID) |
| 524 | typeID = &id |
| 525 | } |
| 526 | |
| 527 | variables := map[string]any{ |
| 528 | "input": UpdateIssueIssueTypeInput{ |
| 529 | IssueID: githubv4.ID(issueID), |
| 530 | IssueTypeID: typeID, |
| 531 | }, |
| 532 | } |
| 533 | |
| 534 | return client.Mutate(hostname, "UpdateIssueIssueType", &mutation, variables) |
| 535 | } |
| 536 | |
| 537 | // AddSubIssue adds a sub-issue to a parent issue. |
| 538 | func AddSubIssue(client *Client, hostname string, parentID string, subIssueID string, replaceParent bool) error { |
no test coverage detected