File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,9 @@ void handlePR(string action, PullRequest pr)
181181 return ;
182182 if (action == " synchronize" )
183183 {
184- checkAndRemoveMergeLabels(labelsAndCommits.labels, pr);
184+ enum toRemoveLabels = [" auto-merge" , " auto-merge-squash" ,
185+ " needs rebase" , " needs work" ];
186+ checkAndRemoveLabels(labelsAndCommits.labels, pr, toRemoveLabels);
185187 if (labelsAndCommits.commits ! is null )
186188 commits = labelsAndCommits.commits;
187189 }
Original file line number Diff line number Diff line change @@ -229,11 +229,11 @@ Json[] tryMerge(in ref PullRequest pr, MergeMethod method)
229229 return commits;
230230}
231231
232- void checkAndRemoveMergeLabels (Json[] labels, in ref PullRequest pr)
232+ void checkAndRemoveLabels (Json[] labels, in ref PullRequest pr, in string [] toRemoveLabels )
233233{
234234 labels
235235 .map! (l => l[" name" ].get ! string )
236- .filter! (n => n.startsWith( " auto-merge " ))
236+ .filter! (n => toRemoveLabels.canFind(n ))
237237 .each! (l => pr.removeLabel(l));
238238}
239239
You can’t perform that action at this time.
0 commit comments