MCPcopy
hub / github.com/cli/cli / PullRequestGraphQL

Function PullRequestGraphQL

api/query_builder.go:466–471  ·  view source on GitHub ↗

PullRequestGraphQL constructs a GraphQL query fragment for a set of pull request fields. It will try to sanitize the fields to just those available on pull request.

(fields []string)

Source from the content-addressed store, hash-verified

464// PullRequestGraphQL constructs a GraphQL query fragment for a set of pull request fields.
465// It will try to sanitize the fields to just those available on pull request.
466func PullRequestGraphQL(fields []string) string {
467 s := set.NewStringSet()
468 s.AddValues(fields)
469 s.RemoveValues(issueOnlyFields)
470 return IssueGraphQL(s.ToSlice())
471}
472
473var RepositoryFields = []string{
474 "id",

Callers 8

FindIssueOrPRFunction · 0.92
searchPullRequestsFunction · 0.92
findByNumberFunction · 0.92
findForRefsFunction · 0.92
ListMethod · 0.92
pullRequestStatusFunction · 0.92
pullRequestFragmentFunction · 0.92
TestPullRequestGraphQLFunction · 0.85

Calls 5

NewStringSetFunction · 0.92
IssueGraphQLFunction · 0.85
AddValuesMethod · 0.80
RemoveValuesMethod · 0.80
ToSliceMethod · 0.65

Tested by 1

TestPullRequestGraphQLFunction · 0.68