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

Function AddBlockedBy

api/queries_issue.go:569–591  ·  view source on GitHub ↗

AddBlockedBy marks an issue as blocked by another issue.

(client *Client, hostname string, issueID string, blockingIssueID string)

Source from the content-addressed store, hash-verified

567
568// AddBlockedBy marks an issue as blocked by another issue.
569func AddBlockedBy(client *Client, hostname string, issueID string, blockingIssueID string) error {
570 type AddBlockedByInput struct {
571 IssueID githubv4.ID `json:"issueId"`
572 BlockingIssueID githubv4.ID `json:"blockingIssueId"`
573 }
574
575 var mutation struct {
576 AddBlockedBy struct {
577 Issue struct {
578 ID string
579 }
580 } `graphql:"addBlockedBy(input: $input)"`
581 }
582
583 variables := map[string]interface{}{
584 "input": AddBlockedByInput{
585 IssueID: githubv4.ID(issueID),
586 BlockingIssueID: githubv4.ID(blockingIssueID),
587 },
588 }
589
590 return client.Mutate(hostname, "AddBlockedBy", &mutation, variables)
591}
592
593// RemoveBlockedBy removes a "blocked by" relationship between two issues.
594func RemoveBlockedBy(client *Client, hostname string, issueID string, blockingIssueID string) error {

Callers 1

DeferredUpdateIssueFunction · 0.85

Calls 2

IDMethod · 0.65
MutateMethod · 0.65

Tested by

no test coverage detected