Sie auch GraphQL API v4 können eine einzelne Anforderung verwenden Gesamtzahl der Fragen zu erhalten, PR mit Zahl pro Zustand (CLOSED
, OPENED
oder MERGED
):
{
user(login: "bertrandmartel") {
totalPR: pullRequests {
totalCount
}
openedPR: pullRequests(states: OPEN) {
totalCount
}
closedPR: pullRequests(states: CLOSED) {
totalCount
}
mergedPR: pullRequests(states: MERGED) {
totalCount
}
totalIssues: issues {
totalCount
}
openedIssues: issues(states: OPEN) {
totalCount
}
closedIssues: issues(states: CLOSED) {
totalCount
}
}
}
Try it in the explorer
, die Sie gibt ein Ergebnis wie folgt:
{
"data": {
"user": {
"totalPR": {
"totalCount": 17
},
"openedPR": {
"totalCount": 4
},
"closedPR": {
"totalCount": 1
},
"mergedPR": {
"totalCount": 12
},
"totalIssues": {
"totalCount": 80
},
"openedIssues": {
"totalCount": 7
},
"closedIssues": {
"totalCount": 73
}
}
}
}