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)
| 484 | // UpdateIssueIssueType sets or clears the issue type on an issue. Pass an |
| 485 | // empty issueTypeID to clear the issue type. |
| 486 | func UpdateIssueIssueType(client *Client, hostname string, issueID string, issueTypeID string) error { |
| 487 | type UpdateIssueIssueTypeInput struct { |
| 488 | IssueID githubv4.ID `json:"issueId"` |
| 489 | IssueTypeID *githubv4.ID `json:"issueTypeId"` |
| 490 | } |
| 491 | |
| 492 | var mutation struct { |
| 493 | UpdateIssueIssueType struct { |
| 494 | Issue struct { |
| 495 | ID string |
| 496 | } |
| 497 | } `graphql:"updateIssueIssueType(input: $input)"` |
| 498 | } |
| 499 | |
| 500 | var typeID *githubv4.ID |
| 501 | if issueTypeID != "" { |
| 502 | id := githubv4.ID(issueTypeID) |
| 503 | typeID = &id |
| 504 | } |
| 505 | |
| 506 | variables := map[string]interface{}{ |
| 507 | "input": UpdateIssueIssueTypeInput{ |
| 508 | IssueID: githubv4.ID(issueID), |
| 509 | IssueTypeID: typeID, |
| 510 | }, |
| 511 | } |
| 512 | |
| 513 | return client.Mutate(hostname, "UpdateIssueIssueType", &mutation, variables) |
| 514 | } |
| 515 | |
| 516 | // AddSubIssue adds a sub-issue to a parent issue. |
| 517 | func AddSubIssue(client *Client, hostname string, parentID string, subIssueID string, replaceParent bool) error { |
no test coverage detected