X Tutup
Skip to content

Commit 885e947

Browse files
committed
Shorten GraphQL query for pr status --json
1 parent f5cd33b commit 885e947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/queries_pr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func PullRequestStatus(client *Client, repo ghrepo.Interface, options StatusOpti
396396
// these are always necessary to find the PR for the current branch
397397
fields.AddValues([]string{"isCrossRepository", "headRepositoryOwner", "headRefName"})
398398
gr := PullRequestGraphQL(fields.ToSlice())
399-
fragments = fmt.Sprintf("fragment pr on PullRequest{%[1]s}fragment prWithReviews on PullRequest{%[1]s}", gr)
399+
fragments = fmt.Sprintf("fragment pr on PullRequest{%s}fragment prWithReviews on PullRequest{...pr}", gr)
400400
} else {
401401
var err error
402402
fragments, err = pullRequestFragment(client.http, repo.RepoHost())

0 commit comments

Comments
 (0)
X Tutup