Skip to content

Commit 247e408

Browse files
denelonCopilot
andcommitted
Fix policy bot bugs and expand label coverage
Bug fixes: - Fix duplicate ID in scheduledSearch.markNoRecentActivity.yml - Fix misleading description (said 'Close' but action is 'addLabel') - Fix typo 'Markss' -> 'Marks' - Fix wrong comment (said 'Zipped-Binary' for Windows-Sandbox rule) Improvements: - Add 7 missing moderator comment triggers: Command-DSCv3, Command-Features, Command-Font, Command-Hash, Command-MCP, Command-Repair, Command-Settings - Add missing labels to Reset-Labels command in moderatorTriggers - Expand triageLabels to remove Needs-Triage for all command, context, issue-type, and feature labels (not just Area-* labels) - Extend cleanEmailReply to cover Pull_Request_Review_Comment payloads Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2e56941 commit 247e408

4 files changed

Lines changed: 137 additions & 5 deletions

File tree

.github/policies/labelManagement.issueUpdated.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ configuration:
3030
triggerOnOwnActions: False
3131
- description: Clean email replies on every comment
3232
if:
33-
- payloadType: Issue_Comment
33+
- or:
34+
- payloadType: Issue_Comment
35+
- payloadType: Pull_Request_Review_Comment
3436
then:
3537
- cleanEmailReply
3638
- description: Remove "Help-Wanted" label when an issue goes into PR

.github/policies/labelManagement.triageLabels.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,56 @@ configuration:
5050
label: Blocking-Issue
5151
- labelAdded:
5252
label: Breaking-Change
53+
- labelAdded:
54+
label: Command-Configure
55+
- labelAdded:
56+
label: Command-Download
57+
- labelAdded:
58+
label: Command-DSCv3
59+
- labelAdded:
60+
label: Command-Export
61+
- labelAdded:
62+
label: Command-Features
63+
- labelAdded:
64+
label: Command-Font
65+
- labelAdded:
66+
label: Command-Hash
67+
- labelAdded:
68+
label: Command-Import
69+
- labelAdded:
70+
label: Command-Install
71+
- labelAdded:
72+
label: Command-List
73+
- labelAdded:
74+
label: Command-MCP
75+
- labelAdded:
76+
label: Command-Pin
77+
- labelAdded:
78+
label: Command-Repair
79+
- labelAdded:
80+
label: Command-Search
81+
- labelAdded:
82+
label: Command-Settings
83+
- labelAdded:
84+
label: Command-Show
85+
- labelAdded:
86+
label: Command-Source
87+
- labelAdded:
88+
label: Command-Uninstall
89+
- labelAdded:
90+
label: Command-Upgrade
91+
- labelAdded:
92+
label: Command-Validate
93+
- labelAdded:
94+
label: Context-Elevated-User
95+
- labelAdded:
96+
label: Context-User
97+
- labelAdded:
98+
label: Context-System
5399
- labelAdded:
54100
label: Dependencies
101+
- labelAdded:
102+
label: DSC-Resource
55103
- labelAdded:
56104
label: Experimental
57105
- labelAdded:
@@ -60,18 +108,30 @@ configuration:
60108
label: In-PR
61109
- labelAdded:
62110
label: Interactive-Only-Installer
111+
- labelAdded:
112+
label: Issue-Bug
113+
- labelAdded:
114+
label: Issue-Docs
115+
- labelAdded:
116+
label: Issue-Feature
63117
- labelAdded:
64118
label: msstore
65119
- labelAdded:
66120
label: Needs-Attention
67121
- labelAdded:
68122
label: Needs-Author-Feedback
123+
- labelAdded:
124+
label: Needs-Repro
69125
- labelAdded:
70126
label: Portable
127+
- labelAdded:
128+
label: PowerShell
71129
- labelAdded:
72130
label: Public-Service-Announcement
73131
- labelAdded:
74132
label: Side-By-Side
133+
- labelAdded:
134+
label: Windows-Sandbox
75135
- labelAdded:
76136
label: Zipped-Binary
77137
then:

.github/policies/moderatorTriggers.yml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,14 @@ configuration:
228228
then:
229229
- addLabel:
230230
label: Command-Download
231+
# Command-DSCv3
232+
- if:
233+
- commentContains:
234+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][dD][sS][cC][vV]3'
235+
isRegex: True
236+
then:
237+
- addLabel:
238+
label: Command-DSCv3
231239
# Command-Export
232240
- if:
233241
- commentContains:
@@ -236,6 +244,30 @@ configuration:
236244
then:
237245
- addLabel:
238246
label: Command-Export
247+
# Command-Features
248+
- if:
249+
- commentContains:
250+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][fF]eatures'
251+
isRegex: True
252+
then:
253+
- addLabel:
254+
label: Command-Features
255+
# Command-Font
256+
- if:
257+
- commentContains:
258+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][fF]ont'
259+
isRegex: True
260+
then:
261+
- addLabel:
262+
label: Command-Font
263+
# Command-Hash
264+
- if:
265+
- commentContains:
266+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][hH]ash'
267+
isRegex: True
268+
then:
269+
- addLabel:
270+
label: Command-Hash
239271
# Command-Import
240272
- if:
241273
- commentContains:
@@ -260,6 +292,14 @@ configuration:
260292
then:
261293
- addLabel:
262294
label: Command-List
295+
# Command-MCP
296+
- if:
297+
- commentContains:
298+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][mM][cC][pP]'
299+
isRegex: True
300+
then:
301+
- addLabel:
302+
label: Command-MCP
263303
# Command-Pin
264304
- if:
265305
- commentContains:
@@ -268,6 +308,14 @@ configuration:
268308
then:
269309
- addLabel:
270310
label: Command-Pin
311+
# Command-Repair
312+
- if:
313+
- commentContains:
314+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][rR]epair'
315+
isRegex: True
316+
then:
317+
- addLabel:
318+
label: Command-Repair
271319
# Command-Search
272320
- if:
273321
- commentContains:
@@ -276,6 +324,14 @@ configuration:
276324
then:
277325
- addLabel:
278326
label: Command-Search
327+
# Command-Settings
328+
- if:
329+
- commentContains:
330+
pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]ettings'
331+
isRegex: True
332+
then:
333+
- addLabel:
334+
label: Command-Settings
279335
# Command-Show
280336
- if:
281337
- commentContains:
@@ -476,7 +532,7 @@ configuration:
476532
then:
477533
- addLabel:
478534
label: Zipped-Binary
479-
# Zipped-Binary
535+
# Windows-Sandbox
480536
- if:
481537
- commentContains:
482538
pattern: '\[[Pp]olicy\]\s+([wW]indows[\s-])?[sS]andbox'
@@ -602,18 +658,32 @@ configuration:
602658
label: Command-Configure
603659
- removeLabel:
604660
label: Command-Download
661+
- removeLabel:
662+
label: Command-DSCv3
605663
- removeLabel:
606664
label: Command-Export
665+
- removeLabel:
666+
label: Command-Features
667+
- removeLabel:
668+
label: Command-Font
669+
- removeLabel:
670+
label: Command-Hash
607671
- removeLabel:
608672
label: Command-Import
609673
- removeLabel:
610674
label: Command-Install
611675
- removeLabel:
612676
label: Command-List
677+
- removeLabel:
678+
label: Command-MCP
613679
- removeLabel:
614680
label: Command-Pin
681+
- removeLabel:
682+
label: Command-Repair
615683
- removeLabel:
616684
label: Command-Search
685+
- removeLabel:
686+
label: Command-Settings
617687
- removeLabel:
618688
label: Command-Show
619689
- removeLabel:

.github/policies/scheduledSearch.markNoRecentActivity.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
id: scheduledSearch.closeNoRecentActivity
1+
id: scheduledSearch.markNoRecentActivity
22
name: GitOps.PullRequestIssueManagement
3-
description: Markss issues that are inactive
3+
description: Marks issues that are inactive
44
owner:
55
resource: repository
66
disabled: false
@@ -45,7 +45,7 @@ configuration:
4545
* Has not had activity in the last 7 days
4646
4747
Then -
48-
* Close the Issue
48+
* Mark the Issue with No-Recent-Activity
4949
frequencies:
5050
- hourly:
5151
hour: 6

0 commit comments

Comments
 (0)