File tree 2 files changed +5
-3
lines changed 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)
181
181
return ;
182
182
if (action == " synchronize" )
183
183
{
184
- checkAndRemoveMergeLabels(labelsAndCommits.labels, pr);
184
+ enum toRemoveLabels = [" auto-merge" , " auto-merge-squash" ,
185
+ " needs rebase" , " needs work" ];
186
+ checkAndRemoveLabels(labelsAndCommits.labels, pr, toRemoveLabels);
185
187
if (labelsAndCommits.commits ! is null )
186
188
commits = labelsAndCommits.commits;
187
189
}
Original file line number Diff line number Diff line change @@ -229,11 +229,11 @@ Json[] tryMerge(in ref PullRequest pr, MergeMethod method)
229
229
return commits;
230
230
}
231
231
232
- void checkAndRemoveMergeLabels (Json[] labels, in ref PullRequest pr)
232
+ void checkAndRemoveLabels (Json[] labels, in ref PullRequest pr, in string [] toRemoveLabels )
233
233
{
234
234
labels
235
235
.map! (l => l[" name" ].get ! string )
236
- .filter! (n => n.startsWith( " auto-merge " ))
236
+ .filter! (n => toRemoveLabels.canFind(n ))
237
237
.each! (l => pr.removeLabel(l));
238
238
}
239
239
You can’t perform that action at this time.
0 commit comments