Shorten GraphQL query for pr status --json
This commit is contained in:
parent
f5cd33b4bf
commit
885e94786a
1 changed files with 1 additions and 1 deletions
|
|
@ -396,7 +396,7 @@ func PullRequestStatus(client *Client, repo ghrepo.Interface, options StatusOpti
|
|||
// these are always necessary to find the PR for the current branch
|
||||
fields.AddValues([]string{"isCrossRepository", "headRepositoryOwner", "headRefName"})
|
||||
gr := PullRequestGraphQL(fields.ToSlice())
|
||||
fragments = fmt.Sprintf("fragment pr on PullRequest{%[1]s}fragment prWithReviews on PullRequest{%[1]s}", gr)
|
||||
fragments = fmt.Sprintf("fragment pr on PullRequest{%s}fragment prWithReviews on PullRequest{...pr}", gr)
|
||||
} else {
|
||||
var err error
|
||||
fragments, err = pullRequestFragment(client.http, repo.RepoHost())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue