Add closedByPullRequestsReferences JSON field to issue view (#10941)
* [gh issue view] Expose `closedByPullRequestsReferences` JSON fields * Incorporate GitHub Copilot review suggestions * Incorporate review changes
This commit is contained in:
parent
315876852a
commit
ee281fd9ba
7 changed files with 187 additions and 11 deletions
|
|
@ -56,6 +56,25 @@ var issueCommentLast = shortenQuery(`
|
|||
}
|
||||
`)
|
||||
|
||||
var issueClosedByPullRequestsReferences = shortenQuery(`
|
||||
closedByPullRequestsReferences(first: 100) {
|
||||
nodes {
|
||||
id,
|
||||
number,
|
||||
url,
|
||||
repository {
|
||||
id,
|
||||
name,
|
||||
owner {
|
||||
id,
|
||||
login
|
||||
}
|
||||
}
|
||||
}
|
||||
pageInfo{hasNextPage,endCursor}
|
||||
}
|
||||
`)
|
||||
|
||||
var prReviewRequests = shortenQuery(`
|
||||
reviewRequests(first: 100) {
|
||||
nodes {
|
||||
|
|
@ -296,6 +315,7 @@ var sharedIssuePRFields = []string{
|
|||
var issueOnlyFields = []string{
|
||||
"isPinned",
|
||||
"stateReason",
|
||||
"closedByPullRequestsReferences",
|
||||
}
|
||||
|
||||
var IssueFields = append(sharedIssuePRFields, issueOnlyFields...)
|
||||
|
|
@ -388,6 +408,8 @@ func IssueGraphQL(fields []string) string {
|
|||
q = append(q, StatusCheckRollupGraphQLWithCountByState())
|
||||
case "closingIssuesReferences":
|
||||
q = append(q, prClosingIssuesReferences)
|
||||
case "closedByPullRequestsReferences":
|
||||
q = append(q, issueClosedByPullRequestsReferences)
|
||||
default:
|
||||
q = append(q, field)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue