Improve issue view re: overfetching, PR support
- Supports passing a PR as argument, not just issues - Makes it non-fatal when project cards were not able to load - Cleans up legacy method for fetching issues
This commit is contained in:
parent
3cf3d6d2d4
commit
34fc5fb75c
11 changed files with 240 additions and 183 deletions
|
|
@ -35,6 +35,22 @@ var issueComments = shortenQuery(`
|
|||
}
|
||||
`)
|
||||
|
||||
var issueCommentLast = shortenQuery(`
|
||||
comments(last: 1) {
|
||||
nodes {
|
||||
author{login},
|
||||
authorAssociation,
|
||||
body,
|
||||
createdAt,
|
||||
includesCreatedEdit,
|
||||
isMinimized,
|
||||
minimizedReason,
|
||||
reactionGroups{content,users{totalCount}}
|
||||
},
|
||||
totalCount
|
||||
}
|
||||
`)
|
||||
|
||||
var prReviewRequests = shortenQuery(`
|
||||
reviewRequests(first: 100) {
|
||||
nodes {
|
||||
|
|
@ -206,6 +222,8 @@ func PullRequestGraphQL(fields []string) string {
|
|||
q = append(q, `potentialMergeCommit{oid}`)
|
||||
case "comments":
|
||||
q = append(q, issueComments)
|
||||
case "lastComment": // pseudo-field
|
||||
q = append(q, issueCommentLast)
|
||||
case "reviewRequests":
|
||||
q = append(q, prReviewRequests)
|
||||
case "reviews":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue