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

Function PullRequestGraphQL

api/query_builder.go:469–474  ·  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

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

Callers 9

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 2

TestPullRequestGraphQLFunction · 0.68