MCPcopy Index your code
hub / github.com/github/github-mcp-server / GetIssueBlocking

Function GetIssueBlocking

pkg/github/issue_dependencies.go:215–228  ·  view source on GitHub ↗

GetIssueBlocking lists the issues that the given issue blocks.

(ctx context.Context, client *githubv4.Client, owner, repo string, issueNumber int, pagination *GraphQLPaginationParams)

Source from the content-addressed store, hash-verified

213
214// GetIssueBlocking lists the issues that the given issue blocks.
215func 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

Callers 1

IssueDependencyReadFunction · 0.85

Calls 2

dependencyQueryVarsFunction · 0.85
dependencyResultFunction · 0.85

Tested by

no test coverage detected