Add descriptions and new labels to the bot rules (#18342)

Wanted to learn how the bot works, so I went ahead cleaned up the bot
rules a bit. List of changes:
- added a description for each rule (and move it to the top of the rule)
- added all the "Area-" labels and sorted
This commit is contained in:
Carlos Zamora 2025-04-23 13:31:23 -07:00 committed by GitHub
parent 2992421761
commit 093f5d168c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,7 +8,7 @@ where:
configuration: configuration:
resourceManagementConfiguration: resourceManagementConfiguration:
scheduledSearches: scheduledSearches:
- description: - description: '"Needs-Author-Feedback" and "No-Recent-Activity" issues are closed after 3 days of inactivity'
frequencies: frequencies:
- hourly: - hourly:
hour: 3 hour: 3
@ -23,7 +23,7 @@ configuration:
days: 3 days: 3
actions: actions:
- closeIssue - closeIssue
- description: - description: '"Needs-Author-Feedback" issues are labelled "No-Recent-Activity" after 4 days of inactivity'
frequencies: frequencies:
- hourly: - hourly:
hour: 3 hour: 3
@ -41,7 +41,7 @@ configuration:
label: No-Recent-Activity label: No-Recent-Activity
- addReply: - addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
- description: - description: '"Resolution-Duplicate" issues are closed after 1 day of inactivity'
frequencies: frequencies:
- hourly: - hourly:
hour: 3 hour: 3
@ -56,7 +56,7 @@ configuration:
- addReply: - addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue - closeIssue
- description: - description: '"Needs-Author-Feedback" and "No-Recent-Activity" PRs are closed after 7 days of inactivity'
frequencies: frequencies:
- hourly: - hourly:
hour: 3 hour: 3
@ -71,7 +71,7 @@ configuration:
days: 7 days: 7
actions: actions:
- closeIssue - closeIssue
- description: - description: Add "No-Recent-Activity" label to PRs with "Needs-Author-Feedback" label after 7 days of inactivity
frequencies: frequencies:
- hourly: - hourly:
hour: 3 hour: 3
@ -90,7 +90,8 @@ configuration:
- addReply: - addReply:
reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**.
eventResponderTasks: eventResponderTasks:
- if: - description: Add "Needs-Triage" to new issues
if:
- payloadType: Issues - payloadType: Issues
- or: - or:
- and: - and:
@ -102,8 +103,8 @@ configuration:
then: then:
- addLabel: - addLabel:
label: Needs-Triage label: Needs-Triage
description: - description: Replace "Needs-Author-Feedback" with "Needs-Attention" when author comments
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- isAction: - isAction:
action: Created action: Created
@ -116,8 +117,8 @@ configuration:
label: Needs-Attention label: Needs-Attention
- removeLabel: - removeLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Remove "No-Recent-Activity" when closing an issue
- if: if:
- payloadType: Issues - payloadType: Issues
- not: - not:
isAction: isAction:
@ -127,16 +128,16 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: No-Recent-Activity label: No-Recent-Activity
description: - description: Remove "No-Recent-Activity" when someone comments on an issue
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- hasLabel: - hasLabel:
label: No-Recent-Activity label: No-Recent-Activity
then: then:
- removeLabel: - removeLabel:
label: No-Recent-Activity label: No-Recent-Activity
description: - description: Add "Needs-Author-Feedback" when changes are requested on a PR
- if: if:
- payloadType: Pull_Request_Review - payloadType: Pull_Request_Review
- isAction: - isAction:
action: Submitted action: Submitted
@ -145,8 +146,8 @@ configuration:
then: then:
- addLabel: - addLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Remove "Needs-Author-Feedback" when author performs activity on their PR
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
- isActivitySender: - isActivitySender:
issueAuthor: True issueAuthor: True
@ -158,8 +159,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Remove "Needs-Author-Feedback" when author comments on their issue
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- isActivitySender: - isActivitySender:
issueAuthor: True issueAuthor: True
@ -168,8 +169,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Remove "Needs-Author-Feedback" when the author reviews the PR
- if: if:
- payloadType: Pull_Request_Review - payloadType: Pull_Request_Review
- isActivitySender: - isActivitySender:
issueAuthor: True issueAuthor: True
@ -178,8 +179,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Remove "No-Recent-Activity"" when activity occurs on the PR (aside from closing it)
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
- not: - not:
isAction: isAction:
@ -189,39 +190,39 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: No-Recent-Activity label: No-Recent-Activity
description: - description: Remove "No-Recent-Activity" when someone comments on the PR
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- hasLabel: - hasLabel:
label: No-Recent-Activity label: No-Recent-Activity
then: then:
- removeLabel: - removeLabel:
label: No-Recent-Activity label: No-Recent-Activity
description: - description: Remove "No-Recent-Activity" when someone reviews the PR
- if: if:
- payloadType: Pull_Request_Review - payloadType: Pull_Request_Review
- hasLabel: - hasLabel:
label: No-Recent-Activity label: No-Recent-Activity
then: then:
- removeLabel: - removeLabel:
label: No-Recent-Activity label: No-Recent-Activity
description: - description: Enable auto-merge on PRs with the "AutoMerge" label
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
- hasLabel: - hasLabel:
label: AutoMerge label: AutoMerge
then: then:
- enableAutoMerge: - enableAutoMerge:
mergeMethod: Squash mergeMethod: Squash
description: - description: Disable auto-merge on PRs when the "AutoMerge" label is removed
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
- labelRemoved: - labelRemoved:
label: AutoMerge label: AutoMerge
then: then:
- disableAutoMerge - disableAutoMerge
description: - description: Add "Needs-Tag-Fix" label to issues without an Area, Issue, or Product label
- if: if:
- payloadType: Issues - payloadType: Issues
- or: - or:
- and: - and:
@ -238,15 +239,45 @@ configuration:
- not: - not:
hasLabel: hasLabel:
label: Area-Accessibility label: Area-Accessibility
- not:
hasLabel:
label: Area-AtlasEngine
- not:
hasLabel:
label: Area-AzureShell
- not: - not:
hasLabel: hasLabel:
label: Area-Build label: Area-Build
- not:
hasLabel:
label: Area-Chat
- not:
hasLabel:
label: Area-CmdPal
- not:
hasLabel:
label: Area-CodeHealth
- not:
hasLabel:
label: Area-Commandline
- not:
hasLabel:
label: Area-CookedRead
- not:
hasLabel:
label: Area-DefApp
- not: - not:
hasLabel: hasLabel:
label: Area-Extensibility label: Area-Extensibility
- not: - not:
hasLabel: hasLabel:
label: Area-Fonts label: Area-Fonts
- not:
hasLabel:
label: Area-GroupPolicy
- not:
hasLabel:
label: Area-i18n
- not: - not:
hasLabel: hasLabel:
label: Area-Input label: Area-Input
@ -256,21 +287,45 @@ configuration:
- not: - not:
hasLabel: hasLabel:
label: Area-Interop label: Area-Interop
- not:
hasLabel:
label: Area-Localization
- not: - not:
hasLabel: hasLabel:
label: Area-Output label: Area-Output
- not: - not:
hasLabel: hasLabel:
label: Area-Performance label: Area-Performance
- not:
hasLabel:
label: Area-Portable
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-Remoting
- not: - not:
hasLabel: hasLabel:
label: Area-Rendering label: Area-Rendering
- not:
hasLabel:
label: Area-Schema
- not: - not:
hasLabel: hasLabel:
label: Area-Server label: Area-Server
- not: - not:
hasLabel: hasLabel:
label: Area-Settings label: Area-Settings
- not:
hasLabel:
label: Area-SettingsUI
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-Suggestions
- not: - not:
hasLabel: hasLabel:
label: Area-TerminalConnection label: Area-TerminalConnection
@ -279,49 +334,19 @@ configuration:
label: Area-TerminalControl label: Area-TerminalControl
- not: - not:
hasLabel: hasLabel:
label: Area-User Interface label: Area-Theming
- not:
hasLabel:
label: Area-UserInterface
- not: - not:
hasLabel: hasLabel:
label: Area-VT label: Area-VT
- not:
hasLabel:
label: Area-CodeHealth
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-AzureShell
- not:
hasLabel:
label: Area-Schema
- not:
hasLabel:
label: Area-Commandline
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-WPFControl
- not:
hasLabel:
label: Area-Settings UI
- not:
hasLabel:
label: Area-DefApp
- not:
hasLabel:
label: Area-Remoting
- not: - not:
hasLabel: hasLabel:
label: Area-Windowing label: Area-Windowing
- not: - not:
hasLabel: hasLabel:
label: Area-Theming label: Area-WPFControl
- not:
hasLabel:
label: Area-Localization
- and: - and:
- not: - not:
hasLabel: hasLabel:
@ -408,8 +433,8 @@ configuration:
then: then:
- addLabel: - addLabel:
label: Needs-Tag-Fix label: Needs-Tag-Fix
description: - description: Remove "Needs-Tag-Fix" label when an issue is tagged with an Area, Issue, and Product label
- if: if:
- payloadType: Issues - payloadType: Issues
- and: - and:
- isLabeled - isLabeled
@ -417,66 +442,117 @@ configuration:
label: Needs-Tag-Fix label: Needs-Tag-Fix
- and: - and:
- or: - or:
- hasLabel: - not:
label: Area-Accessibility hasLabel:
- hasLabel: label: Area-Accessibility
label: Area-Build - not:
- hasLabel: hasLabel:
label: Area-Extensibility label: Area-AtlasEngine
- hasLabel: - not:
label: Area-Fonts hasLabel:
- hasLabel: label: Area-AzureShell
label: Area-Input - not:
- hasLabel: hasLabel:
label: Area-Interaction label: Area-Build
- hasLabel: - not:
label: Area-Interop hasLabel:
- hasLabel: label: Area-Chat
label: Area-Output - not:
- hasLabel: hasLabel:
label: Area-Performance label: Area-CmdPal
- hasLabel: - not:
label: Area-Rendering hasLabel:
- hasLabel: label: Area-CodeHealth
label: Area-Server - not:
- hasLabel: hasLabel:
label: Area-Settings label: Area-Commandline
- hasLabel: - not:
label: Area-TerminalConnection hasLabel:
- hasLabel: label: Area-CookedRead
label: Area-TerminalControl - not:
- hasLabel: hasLabel:
label: Area-User Interface label: Area-DefApp
- hasLabel: - not:
label: Area-VT hasLabel:
- hasLabel: label: Area-Extensibility
label: Area-CodeHealth - not:
- hasLabel: hasLabel:
label: Area-Quality label: Area-Fonts
- hasLabel: - not:
label: Area-Schema hasLabel:
- hasLabel: label: Area-GroupPolicy
label: Area-AzureShell - not:
- hasLabel: hasLabel:
label: Area-Commandline label: Area-i18n
- hasLabel: - not:
label: Area-ShellExtension hasLabel:
- hasLabel: label: Area-Input
label: Area-WPFControl - not:
- hasLabel: hasLabel:
label: Area-Settings UI label: Area-Interaction
- hasLabel: - not:
label: Area-DefApp hasLabel:
- hasLabel: label: Area-Interop
label: Area-Localization - not:
- hasLabel: hasLabel:
label: Area-Windowing label: Area-Localization
- hasLabel: - not:
label: Area-Theming hasLabel:
- hasLabel: label: Area-Output
label: Area-AtlasEngine - not:
- hasLabel: hasLabel:
label: Area-CmdPal label: Area-Performance
- not:
hasLabel:
label: Area-Portable
- not:
hasLabel:
label: Area-Quality
- not:
hasLabel:
label: Area-Remoting
- not:
hasLabel:
label: Area-Rendering
- not:
hasLabel:
label: Area-Schema
- not:
hasLabel:
label: Area-Server
- not:
hasLabel:
label: Area-Settings
- not:
hasLabel:
label: Area-SettingsUI
- not:
hasLabel:
label: Area-ShellExtension
- not:
hasLabel:
label: Area-Suggestions
- not:
hasLabel:
label: Area-TerminalConnection
- not:
hasLabel:
label: Area-TerminalControl
- not:
hasLabel:
label: Area-Theming
- not:
hasLabel:
label: Area-UserInterface
- not:
hasLabel:
label: Area-VT
- not:
hasLabel:
label: Area-Windowing
- not:
hasLabel:
label: Area-WPFControl
- or: - or:
- hasLabel: - hasLabel:
label: Issue-Bug label: Issue-Bug
@ -533,14 +609,14 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Tag-Fix label: Needs-Tag-Fix
description: - description: Add "In-PR" label to issues that are referenced in a PR
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
then: then:
- inPrLabel: - inPrLabel:
label: In-PR label: In-PR
description: - description: Remove "Needs-Tag-Fix" label when an issue also has the "Resolution-Duplicate" label
- if: if:
- payloadType: Issues - payloadType: Issues
- hasLabel: - hasLabel:
label: Needs-Tag-Fix label: Needs-Tag-Fix
@ -549,8 +625,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Tag-Fix label: Needs-Tag-Fix
description: - description: Close issues that are opened and have the template title
- if: if:
- payloadType: Issues - payloadType: Issues
- or: - or:
- titleContains: - titleContains:
@ -576,8 +652,8 @@ configuration:
label: Needs-Author-Feedback label: Needs-Author-Feedback
- addReply: - addReply:
reply: Hi! Thanks for attempting to open an issue. Unfortunately, your title wasn't changed from the original template which makes it very hard for us to track and triage. You are welcome to fix up the title and try again with a new issue. reply: Hi! Thanks for attempting to open an issue. Unfortunately, your title wasn't changed from the original template which makes it very hard for us to track and triage. You are welcome to fix up the title and try again with a new issue.
description: - description: Close issues that are opened and have no body
- if: if:
- payloadType: Issues - payloadType: Issues
- or: - or:
- isAction: - isAction:
@ -595,8 +671,8 @@ configuration:
label: Needs-Author-Feedback label: Needs-Author-Feedback
- addReply: - addReply:
reply: "Hi! Thanks for attempting to open an issue. Unfortunately, you didn't write anything in the body which makes it impossible to understand your concern. You are welcome to fix up the issue and try again by opening another issue with the body filled out. " reply: "Hi! Thanks for attempting to open an issue. Unfortunately, you didn't write anything in the body which makes it impossible to understand your concern. You are welcome to fix up the issue and try again by opening another issue with the body filled out. "
description: - description: Request a review from the team when a PR is labeled "Needs-Second"
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
- isLabeled - isLabeled
- hasLabel: - hasLabel:
@ -613,8 +689,8 @@ configuration:
reviewer: dhowett reviewer: dhowett
- requestReview: - requestReview:
reviewer: lhecker reviewer: lhecker
description: - description: Remove "Needs-Second" label when a PR is reviewed
- if: if:
- payloadType: Pull_Request_Review - payloadType: Pull_Request_Review
- not: isOpen - not: isOpen
- hasLabel: - hasLabel:
@ -622,8 +698,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Needs-Second label: Needs-Second
description: - description: Remove "Help-Wanted" label from issues that are in a PR
- if: if:
- payloadType: Issues - payloadType: Issues
- hasLabel: - hasLabel:
label: In-PR label: In-PR
@ -633,8 +709,8 @@ configuration:
then: then:
- removeLabel: - removeLabel:
label: Help-Wanted label: Help-Wanted
description: - description: Comments with "/dup", "/dupe", or "/duplicate" will close the issue as a duplicate and remove "Needs-" labels
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- commentContains: - commentContains:
pattern: '\/dup(licate|e)?(\s+of)?\s+\#[\d]+' pattern: '\/dup(licate|e)?(\s+of)?\s+\#[\d]+'
@ -662,8 +738,8 @@ configuration:
label: Needs-Repro label: Needs-Repro
- removeLabel: - removeLabel:
label: Needs-Second label: Needs-Second
description: - description: Comments with "/feedback" will direct people to Feedback Hub
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- commentContains: - commentContains:
pattern: '\/feedback' pattern: '\/feedback'
@ -680,13 +756,13 @@ configuration:
Hi there!<br><br>Can you please send us feedback with the [Feedback Hub](https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332) with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18356694/140811502-a068f78b-89d2-4587-925a-73e19652b830.png)<br><br>![image](https://user-images.githubusercontent.com/18356694/140811557-cdc22a0f-fa6a-4f6a-953e-73b51f5548a3.png)<br><br>![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png) Hi there!<br><br>Can you please send us feedback with the [Feedback Hub](https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332) with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18356694/140811502-a068f78b-89d2-4587-925a-73e19652b830.png)<br><br>![image](https://user-images.githubusercontent.com/18356694/140811557-cdc22a0f-fa6a-4f6a-953e-73b51f5548a3.png)<br><br>![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
- addLabel: - addLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description: - description: Comments clean the email reply
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
then: then:
- cleanEmailReply - cleanEmailReply
description: - description: Sync labels when a PR event occurs
- if: if:
- payloadType: Pull_Request - payloadType: Pull_Request
then: then:
- labelSync: - labelSync:
@ -701,8 +777,8 @@ configuration:
pattern: Severity- pattern: Severity-
- labelSync: - labelSync:
pattern: Impact- pattern: Impact-
description: - description: Comments with "/dup", "/dupe", or "/duplicate" targeting another repo will close the issue as a duplicate and remove "Needs-" labels
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- commentContains: - commentContains:
pattern: '\/dup(licate|e)?(\s+of)?\s+https' pattern: '\/dup(licate|e)?(\s+of)?\s+https'
@ -730,8 +806,8 @@ configuration:
label: Needs-Repro label: Needs-Repro
- removeLabel: - removeLabel:
label: Needs-Second label: Needs-Second
description: - description: Comments with "/?" will replace the "Needs-Attention" label with "Needs-Author-Feedback"
- if: if:
- payloadType: Issue_Comment - payloadType: Issue_Comment
- commentContains: - commentContains:
pattern: /? pattern: /?
@ -746,6 +822,5 @@ configuration:
label: Needs-Attention label: Needs-Attention
- addLabel: - addLabel:
label: Needs-Author-Feedback label: Needs-Author-Feedback
description:
onFailure: onFailure:
onSuccess: onSuccess: