Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 1 | // 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 Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 5 | const String noStatusInCommitJson = ''' |
Ricardo Amador | fa49c16 | 2022-07-08 14:45:04 -0700 | [diff] [blame] | 6 | { |
| 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 Hillers | 2610317 | 2022-07-19 11:31:04 -0700 | [diff] [blame] | 25 | |
Ricardo Amador | fa49c16 | 2022-07-08 14:45:04 -0700 | [diff] [blame] | 26 | ] |
| 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 Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 46 | '''; |
Ricardo Amador | fa49c16 | 2022-07-08 14:45:04 -0700 | [diff] [blame] | 47 | |
Drew Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 48 | const String nullStatusCommitRepositoryJson = ''' |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 49 | { |
| 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 Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 85 | '''; |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 86 | |
Drew Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 87 | const String nonNullStatusSUCCESSCommitRepositoryJson = ''' |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 88 | { |
| 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 | { |
keyonghan | f7d8fde | 2023-06-28 16:26:53 -0700 | [diff] [blame] | 108 | "context":"tree-status", |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 109 | "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 Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 132 | '''; |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 133 | |
Drew Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 134 | const String nonNullStatusFAILURECommitRepositoryJson = ''' |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 135 | { |
| 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 | { |
keyonghan | f7d8fde | 2023-06-28 16:26:53 -0700 | [diff] [blame] | 155 | "context":"tree-status", |
Ricardo Amador | d37e5be | 2022-06-30 13:12:03 -0700 | [diff] [blame] | 156 | "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 Roen | 5d3c2be | 2023-09-15 13:34:21 -0500 | [diff] [blame] | 179 | '''; |