blob: 9638790fa55890dfd8188d7a7a835e7baf8f0ec5 [file] [log] [blame]
Ricardo Amadord37e5be2022-06-30 13:12:03 -07001// Copyright 2022 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Drew Roen5d3c2be2023-09-15 13:34:21 -05005const String noStatusInCommitJson = '''
Ricardo Amadorfa49c162022-07-08 14:45:04 -07006{
7 "repository": {
8 "pullRequest": {
9 "author": {
10 "login": "author1"
11 },
12 "authorAssociation": "MEMBER",
13 "id": "PR_kwDOA8VHis43rs4_",
14 "title": "[dependabot] Remove human reviewers",
15 "commits": {
16 "nodes":[
17 {
18 "commit": {
19 "abbreviatedOid": "4009ecc",
20 "oid": "4009ecc0b6dbf5cb19cb97472147063e7368ec10",
21 "committedDate": "2022-05-11T22:35:02Z",
22 "pushedDate": "2022-05-11T22:35:03Z",
23 "status": {
24 "contexts":[
Casey Hillers26103172022-07-19 11:31:04 -070025
Ricardo Amadorfa49c162022-07-08 14:45:04 -070026 ]
27 }
28 }
29 }
30 ]
31 },
32 "reviews": {
33 "nodes": [
34 {
35 "author": {
36 "login": "keyonghan"
37 },
38 "authorAssociation": "MEMBER",
39 "state": "APPROVED"
40 }
41 ]
42 }
43 }
44 }
45 }
Drew Roen5d3c2be2023-09-15 13:34:21 -050046''';
Ricardo Amadorfa49c162022-07-08 14:45:04 -070047
Drew Roen5d3c2be2023-09-15 13:34:21 -050048const String nullStatusCommitRepositoryJson = '''
Ricardo Amadord37e5be2022-06-30 13:12:03 -070049 {
50 "repository": {
51 "pullRequest": {
52 "author": {
53 "login": "author1"
54 },
55 "authorAssociation": "MEMBER",
56 "id": "PR_kwDOA8VHis43rs4_",
57 "title": "[dependabot] Remove human reviewers",
58 "commits": {
59 "nodes":[
60 {
61 "commit": {
62 "abbreviatedOid": "4009ecc",
63 "oid": "4009ecc0b6dbf5cb19cb97472147063e7368ec10",
64 "committedDate": "2022-05-11T22:35:02Z",
65 "pushedDate": "2022-05-11T22:35:03Z",
66 "status": null
67 }
68 }
69 ]
70 },
71 "reviews": {
72 "nodes": [
73 {
74 "author": {
75 "login": "keyonghan"
76 },
77 "authorAssociation": "MEMBER",
78 "state": "APPROVED"
79 }
80 ]
81 }
82 }
83 }
84 }
Drew Roen5d3c2be2023-09-15 13:34:21 -050085 ''';
Ricardo Amadord37e5be2022-06-30 13:12:03 -070086
Drew Roen5d3c2be2023-09-15 13:34:21 -050087const String nonNullStatusSUCCESSCommitRepositoryJson = '''
Ricardo Amadord37e5be2022-06-30 13:12:03 -070088 {
89 "repository": {
90 "pullRequest": {
91 "author": {
92 "login": "author1"
93 },
94 "authorAssociation": "MEMBER",
95 "id": "PR_kwDOA8VHis43rs4_",
96 "title": "[dependabot] Remove human reviewers",
97 "commits": {
98 "nodes":[
99 {
100 "commit": {
101 "abbreviatedOid": "4009ecc",
102 "oid": "4009ecc0b6dbf5cb19cb97472147063e7368ec10",
103 "committedDate": "2022-05-11T22:35:02Z",
104 "pushedDate": "2022-05-11T22:35:03Z",
105 "status": {
106 "contexts":[
107 {
keyonghanf7d8fde2023-06-28 16:26:53 -0700108 "context":"tree-status",
Ricardo Amadord37e5be2022-06-30 13:12:03 -0700109 "state":"SUCCESS",
110 "targetUrl":"https://ci.example.com/1000/output"
111 }
112 ]
113 }
114 }
115 }
116 ]
117 },
118 "reviews": {
119 "nodes": [
120 {
121 "author": {
122 "login": "keyonghan"
123 },
124 "authorAssociation": "MEMBER",
125 "state": "APPROVED"
126 }
127 ]
128 }
129 }
130 }
131 }
Drew Roen5d3c2be2023-09-15 13:34:21 -0500132 ''';
Ricardo Amadord37e5be2022-06-30 13:12:03 -0700133
Drew Roen5d3c2be2023-09-15 13:34:21 -0500134const String nonNullStatusFAILURECommitRepositoryJson = '''
Ricardo Amadord37e5be2022-06-30 13:12:03 -0700135 {
136 "repository": {
137 "pullRequest": {
138 "author": {
139 "login": "author1"
140 },
141 "authorAssociation": "MEMBER",
142 "id": "PR_kwDOA8VHis43rs4_",
143 "title": "[dependabot] Remove human reviewers",
144 "commits": {
145 "nodes":[
146 {
147 "commit": {
148 "abbreviatedOid": "4009ecc",
149 "oid": "4009ecc0b6dbf5cb19cb97472147063e7368ec10",
150 "committedDate": "2022-05-11T22:35:02Z",
151 "pushedDate": "2022-05-11T22:35:03Z",
152 "status": {
153 "contexts":[
154 {
keyonghanf7d8fde2023-06-28 16:26:53 -0700155 "context":"tree-status",
Ricardo Amadord37e5be2022-06-30 13:12:03 -0700156 "state":"FAILURE",
157 "targetUrl":"https://ci.example.com/1000/output"
158 }
159 ]
160 }
161 }
162 }
163 ]
164 },
165 "reviews": {
166 "nodes": [
167 {
168 "author": {
169 "login": "keyonghan"
170 },
171 "authorAssociation": "MEMBER",
172 "state": "APPROVED"
173 }
174 ]
175 }
176 }
177 }
178 }
Drew Roen5d3c2be2023-09-15 13:34:21 -0500179 ''';