File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ void githubHook(HTTPServerRequest req, HTTPServerResponse res)
169169
170170void handlePR (string action, PullRequest pr)
171171{
172+ import std.algorithm : any;
172173 import vibe.core.core : setTimer;
173174
174175 Json[] commits;
@@ -197,7 +198,7 @@ void handlePR(string action, PullRequest pr)
197198
198199 pr.updateGithubComment(comment, action, refs, descs);
199200
200- if (refs.length > 0 && comment.body_.length == 0 )
201+ if (refs.any ! (r => r.fixed) && comment.body_.length == 0 )
201202 pr.addLabels([" Bug fix" ]);
202203
203204 if (runTrello)
Original file line number Diff line number Diff line change @@ -37,13 +37,7 @@ unittest
3737 j = Json.emptyArray;
3838 },
3939 " /bugzilla/buglist.cgi?bug_id=8573&ctype=csv&columnlist=short_desc" ,
40- // action: add bug fix label
41- " /github/repos/dlang/phobos/issues/4921/labels" ,
42- (scope HTTPServerRequest req, scope HTTPServerResponse res){
43- assert (req.method == HTTPMethod.POST );
44- assert (req.json[0 ].get ! string == " Bug fix" );
45- res.writeVoidBody;
46- },
40+ // no bug fix label, since Issues are only referenced but not fixed according to commit messages
4741 " /github/repos/dlang/phobos/issues/4921/comments" ,
4842 (scope HTTPServerRequest req, scope HTTPServerResponse res){
4943 assert (req.method == HTTPMethod.POST );
You can’t perform that action at this time.
0 commit comments