File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ auto detectPRWithPersistentCIFailures(PRTuple t)
146146 case " auto-tester" :
147147 case " CyberShadow/DAutoTest" :
148148 case " continuous-integration/travis-ci/pr" :
149- case " continuous-integration/travis-ci/ jenkins" :
149+ case " continuous-integration/jenkins/pr-merge " :
150150 case " appveyor" :
151151 case " ci/circleci" :
152152 return true ;
Original file line number Diff line number Diff line change @@ -165,3 +165,28 @@ unittest
165165
166166 testCronDaily(repositories);
167167}
168+
169+ // test that two or more failing CI trigger "needs work"
170+ unittest
171+ {
172+ setAPIExpectations(
173+ " /github/repos/dlang/phobos/issues?state=open&sort=updated&direction=asc" , (ref Json j) {
174+ // only test one pull request
175+ j = Json([j[0 ]]);
176+ },
177+ " /github/repos/dlang/phobos/pulls/2526" ,
178+ " /github/repos/dlang/phobos/status/a04acd6a2813fb344d3e47369cf7fd64523ece44" , (ref Json j) {
179+ j[" statuses" ][1 ][" state" ] = " error" ;
180+ j[" statuses" ][2 ][" state" ] = " failure" ;
181+ },
182+ " /github/repos/dlang/phobos/issues/2526/comments" , &dontTestStalled,
183+ " /github/repos/dlang/phobos/pulls/2526/comments" ,
184+ " /github/repos/dlang/phobos/issues/2526/labels" ,
185+ (scope HTTPServerRequest req, scope HTTPServerResponse res){
186+ assert (req.method == HTTPMethod.PUT );
187+ assert (req.json[].map! (e => e.get ! string ).equal([" blocked" , " needs work" ]));
188+ },
189+ );
190+
191+ testCronDaily(repositories);
192+ }
You can’t perform that action at this time.
0 commit comments