GetIssueBlocking lists the issues that the given issue blocks.
(ctx context.Context, client *githubv4.Client, owner, repo string, issueNumber int, pagination *GraphQLPaginationParams)
| 213 | |
| 214 | // GetIssueBlocking lists the issues that the given issue blocks. |
| 215 | func GetIssueBlocking(ctx context.Context, client *githubv4.Client, owner, repo string, issueNumber int, pagination *GraphQLPaginationParams) (*mcp.CallToolResult, error) { |
| 216 | var query struct { |
| 217 | Repository struct { |
| 218 | Issue struct { |
| 219 | Blocking dependencyConnection `graphql:"blocking(first: $first, after: $after)"` |
| 220 | } `graphql:"issue(number: $issueNumber)"` |
| 221 | } `graphql:"repository(owner: $owner, name: $repo)"` |
| 222 | } |
| 223 | |
| 224 | if err := client.Query(ctx, &query, dependencyQueryVars(owner, repo, issueNumber, pagination)); err != nil { |
| 225 | return ghErrors.NewGitHubGraphQLErrorResponse(ctx, "failed to get blocking issues", err), nil |
| 226 | } |
| 227 | return dependencyResult(query.Repository.Issue.Blocking), nil |
| 228 | } |
| 229 | |
| 230 | // IssueDependencyWrite creates a tool to add or remove an issue dependency |
| 231 | // (blocked-by / blocking) relationship. It accepts issue numbers and resolves |
no test coverage detected