MCPcopy Create free account
hub / github.com/cli/cli / AddBlockedBy

Function AddBlockedBy

api/queries_issue.go:590–612  ·  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

588
589// AddBlockedBy marks an issue as blocked by another issue.
590func AddBlockedBy(client *Client, hostname string, issueID string, blockingIssueID string) error {
591 type AddBlockedByInput struct {
592 IssueID githubv4.ID `json:"issueId"`
593 BlockingIssueID githubv4.ID `json:"blockingIssueId"`
594 }
595
596 var mutation struct {
597 AddBlockedBy struct {
598 Issue struct {
599 ID string
600 }
601 } `graphql:"addBlockedBy(input: $input)"`
602 }
603
604 variables := map[string]any{
605 "input": AddBlockedByInput{
606 IssueID: githubv4.ID(issueID),
607 BlockingIssueID: githubv4.ID(blockingIssueID),
608 },
609 }
610
611 return client.Mutate(hostname, "AddBlockedBy", &mutation, variables)
612}
613
614// RemoveBlockedBy removes a "blocked by" relationship between two issues.
615func 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