-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Copy pathquery_prs_and_issues.graphql
45 lines (45 loc) · 1.29 KB
/
query_prs_and_issues.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
query prs_and_issues($want_prs: Boolean!, $pr_cursor: String, $want_issues: Boolean!, $issue_cursor: String) {
rateLimit {
cost
remaining
}
repository(owner: "microsoft", name: "STL") {
pullRequests(first: 100, orderBy: { field: CREATED_AT, direction: DESC }, after: $pr_cursor)
@include(if: $want_prs) {
nodes {
id: number
createdAt
closedAt
mergedAt
labels(first: 6) {
totalCount
nodes {
name
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
issues(first: 100, orderBy: { field: CREATED_AT, direction: DESC }, after: $issue_cursor)
@include(if: $want_issues) {
nodes {
id: number
createdAt
closedAt
labels(first: 5) {
totalCount
nodes {
name
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}