Skip to content

Commit 5ed1dbe

Browse files
committed
Fix fixtures
1 parent c9bcf80 commit 5ed1dbe

File tree

2 files changed

+98
-80
lines changed

2 files changed

+98
-80
lines changed

test/fixtures/prStatus.json

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,57 @@
1-
{"data":{
2-
"repository": {
3-
"pullRequests": {
1+
{
2+
"data": {
3+
"repository": {
4+
"pullRequests": {
5+
"totalCount": 1,
6+
"edges": [
7+
{
8+
"node": {
9+
"number": 10,
10+
"title": "Blueberries are a good fruit",
11+
"url": "https://github.com/github/gh-cli/pull/10",
12+
"headRefName": "blueberries",
13+
"headRepositoryOwner": {
14+
"login": "OWNER"
15+
},
16+
"isCrossRepository": false
17+
}
18+
}
19+
]
20+
}
21+
},
22+
"viewerCreated": {
23+
"totalCount": 1,
424
"edges": [
525
{
626
"node": {
7-
"number": 10,
8-
"title": "Blueberries are a good fruit",
9-
"url": "https://github.com/github/gh-cli/pull/10",
10-
"headRefName": "blueberries",
11-
"headRepositoryOwner": {
12-
"login": "OWNER"
13-
},
14-
"isCrossRepository": false
27+
"number": 8,
28+
"title": "Strawberries are not actually berries",
29+
"url": "https://github.com/github/gh-cli/pull/8",
30+
"headRefName": "strawberries"
1531
}
1632
}
1733
]
18-
}
19-
},
20-
"viewerCreated": {
21-
"edges": [
22-
{
23-
"node": {
24-
"number": 8,
25-
"title": "Strawberries are not actually berries",
26-
"url": "https://github.com/github/gh-cli/pull/8",
27-
"headRefName": "strawberries"
28-
}
29-
}
30-
]
31-
},
32-
"reviewRequested": {
33-
"edges": [
34-
{
35-
"node": {
36-
"number": 9,
37-
"title": "Apples are tasty",
38-
"url": "https://github.com/github/gh-cli/pull/9",
39-
"headRefName": "apples"
40-
}
41-
},
42-
{
43-
"node": {
44-
"number": 11,
45-
"title": "Figs are my favorite",
46-
"url": "https://github.com/github/gh-cli/pull/1",
47-
"headRefName": "figs"
34+
},
35+
"reviewRequested": {
36+
"totalCount": 2,
37+
"edges": [
38+
{
39+
"node": {
40+
"number": 9,
41+
"title": "Apples are tasty",
42+
"url": "https://github.com/github/gh-cli/pull/9",
43+
"headRefName": "apples"
44+
}
45+
},
46+
{
47+
"node": {
48+
"number": 11,
49+
"title": "Figs are my favorite",
50+
"url": "https://github.com/github/gh-cli/pull/1",
51+
"headRefName": "figs"
52+
}
4853
}
49-
}
50-
]
54+
]
55+
}
5156
}
52-
}}
57+
}

test/fixtures/prStatusChecks.json

Lines changed: 49 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
2-
"data":{
2+
"data": {
33
"repository": {
44
"pullRequests": {
5+
"totalCount": 0,
56
"edges": []
67
}
78
},
89
"viewerCreated": {
10+
"totalCount": 3,
911
"edges": [
1012
{
1113
"node": {
@@ -15,17 +17,21 @@
1517
"headRefName": "strawberries",
1618
"reviewDecision": "CHANGES_REQUESTED",
1719
"commits": {
18-
"nodes": [{
19-
"commit": {
20-
"statusCheckRollup": {
21-
"contexts": {
22-
"nodes": [{
23-
"state": "SUCCESS"
24-
}]
20+
"nodes": [
21+
{
22+
"commit": {
23+
"statusCheckRollup": {
24+
"contexts": {
25+
"nodes": [
26+
{
27+
"state": "SUCCESS"
28+
}
29+
]
30+
}
2531
}
2632
}
2733
}
28-
}]
34+
]
2935
}
3036
}
3137
},
@@ -37,18 +43,22 @@
3743
"headRefName": "banananana",
3844
"reviewDecision": "APPROVED",
3945
"commits": {
40-
"nodes": [{
41-
"commit": {
42-
"statusCheckRollup": {
43-
"contexts": {
44-
"nodes": [{
45-
"status": "IN_PROGRESS",
46-
"conclusion": ""
47-
}]
46+
"nodes": [
47+
{
48+
"commit": {
49+
"statusCheckRollup": {
50+
"contexts": {
51+
"nodes": [
52+
{
53+
"status": "IN_PROGRESS",
54+
"conclusion": ""
55+
}
56+
]
57+
}
4858
}
4959
}
5060
}
51-
}]
61+
]
5262
}
5363
}
5464
},
@@ -60,33 +70,36 @@
6070
"headRefName": "avo",
6171
"reviewDecision": "REVIEW_REQUIRED",
6272
"commits": {
63-
"nodes": [{
64-
"commit": {
65-
"statusCheckRollup": {
66-
"contexts": {
67-
"nodes": [
68-
{
69-
"status": "IN_PROGRESS",
70-
"conclusion": ""
71-
},
72-
{
73-
"state": "FAILURE"
74-
},
75-
{
76-
"status": "COMPLETED",
77-
"conclusion": "NEUTRAL"
78-
}
79-
]
73+
"nodes": [
74+
{
75+
"commit": {
76+
"statusCheckRollup": {
77+
"contexts": {
78+
"nodes": [
79+
{
80+
"status": "IN_PROGRESS",
81+
"conclusion": ""
82+
},
83+
{
84+
"state": "FAILURE"
85+
},
86+
{
87+
"status": "COMPLETED",
88+
"conclusion": "NEUTRAL"
89+
}
90+
]
91+
}
8092
}
8193
}
8294
}
83-
}]
95+
]
8496
}
8597
}
8698
}
8799
]
88100
},
89101
"reviewRequested": {
102+
"totalCount": 0,
90103
"edges": []
91104
}
92105
}

0 commit comments

Comments
 (0)