MCPcopy Index your code
hub / github.com/cli/cli / UpdateIssueIssueType

Function UpdateIssueIssueType

api/queries_issue.go:486–514  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

484// UpdateIssueIssueType sets or clears the issue type on an issue. Pass an
485// empty issueTypeID to clear the issue type.
486func 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.
517func AddSubIssue(client *Client, hostname string, parentID string, subIssueID string, replaceParent bool) error {

Callers 1

DeferredUpdateIssueFunction · 0.85

Calls 2

IDMethod · 0.65
MutateMethod · 0.65

Tested by

no test coverage detected