Skip to content

Commit 4583fe6

Browse files
jeherveanomiex
andauthored
Gardening: update conditions to include "[<plugin> Feature]" labels (#40396)
* Gardening: update conditions to include "[<plugin> Feature]" labels Some of our standalone plugins do not use [Feature] labels ; they use [PluginName Feature] labels instead. Let's update our conditions to be happy with such labels as well. This commit also makes the priority condition a bit more broad, so it is satisfied with both "[Pri]" and "[Priority]" labels. * Avoid catching [Type] Feature request See #40396 (comment) --------- Co-authored-by: Brad Jorsch <[email protected]>
1 parent 717a500 commit 4583fe6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: changed
3+
4+
Prompt for labels: update conditions to include "[<plugin> Feature]" labels.

projects/github-actions/repo-gardening/src/tasks/triage-issues/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ async function triageIssues( payload, octokit ) {
152152
const issueLabels = await aiLabeling( payload, octokit );
153153

154154
// At this point, if we still miss a [Type] label, a [Feature] label, or a [Pri] label, ask the author to add it.
155-
const requiredLabelTypes = [ '[Type]', '[Feature', '[Pri]' ];
155+
const requiredLabelTypes = [ /^\[Type\]/, /^\[Pri/, /^\[[^\]]*Feature/ ];
156156
const missingLabelTypes = requiredLabelTypes.filter(
157-
requiredLabelType => ! issueLabels.some( label => label.startsWith( requiredLabelType ) )
157+
requiredLabelType => ! issueLabels.some( label => requiredLabelType.test( label ) )
158158
);
159159

160160
if ( missingLabelTypes.length > 0 ) {

0 commit comments

Comments
 (0)