cli/test/fixtures/prStatusCurrentBranchClosed.json
Mislav Marohnić 93c61a83b2 Fix pr status -R crash with closed PR on the default branch
At the time we have a reference to `baseRepo`, we might still not have
contacted the API nor obtained any information about the default branch
for the repository. This expands the `PullRequests()` query to always
report the default branch so we may choose how to render entries that
belong on the current branch.
2020-05-07 20:53:03 +02:00

47 lines
1.1 KiB
JSON

{
"data": {
"repository": {
"defaultBranchRef": { "name": "master" },
"pullRequests": {
"totalCount": 1,
"edges": [
{
"node": {
"number": 8,
"title": "Blueberries are a good fruit",
"state": "CLOSED",
"url": "https://github.com/cli/cli/pull/8",
"headRefName": "blueberries",
"reviewDecision": "CHANGES_REQUESTED",
"commits": {
"nodes": [
{
"commit": {
"statusCheckRollup": {
"contexts": {
"nodes": [
{
"state": "SUCCESS"
}
]
}
}
}
}
]
}
}
}
]
}
},
"viewerCreated": {
"totalCount": 0,
"edges": []
},
"reviewRequested": {
"totalCount": 0,
"edges": []
}
}
}