AddSubIssue adds a sub-issue to a parent issue.
(client *Client, hostname string, parentID string, subIssueID string, replaceParent bool)
| 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 { |
| 518 | type AddSubIssueInput struct { |
| 519 | IssueID githubv4.ID `json:"issueId"` |
| 520 | SubIssueID githubv4.ID `json:"subIssueId"` |
| 521 | ReplaceParent githubv4.Boolean `json:"replaceParent"` |
| 522 | } |
| 523 | |
| 524 | var mutation struct { |
| 525 | AddSubIssue struct { |
| 526 | Issue struct { |
| 527 | ID string |
| 528 | } |
| 529 | } `graphql:"addSubIssue(input: $input)"` |
| 530 | } |
| 531 | |
| 532 | variables := map[string]interface{}{ |
| 533 | "input": AddSubIssueInput{ |
| 534 | IssueID: githubv4.ID(parentID), |
| 535 | SubIssueID: githubv4.ID(subIssueID), |
| 536 | ReplaceParent: githubv4.Boolean(replaceParent), |
| 537 | }, |
| 538 | } |
| 539 | |
| 540 | return client.Mutate(hostname, "AddSubIssue", &mutation, variables) |
| 541 | } |
| 542 | |
| 543 | // RemoveSubIssue removes a sub-issue from a parent issue. |
| 544 | func RemoveSubIssue(client *Client, hostname string, parentID string, subIssueID string) error { |
no test coverage detected