From aac1dbf8646da27dbb8793bbccecf65d0e89989d Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Thu, 22 Jun 2023 09:27:45 -0700 Subject: [PATCH] Onboarding to GitOps.ResourceManagement (#385) --- .github/fabricbot.json | 1554 ----------------------- .github/policies/resourceManagement.yml | 331 +++++ 2 files changed, 331 insertions(+), 1554 deletions(-) delete mode 100644 .github/fabricbot.json create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 14d4b8b6..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,1554 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Add needs triage label to new issue", - "conditions": { - "operator": "or", - "operands": [ - { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs-Triage" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "bd-cR00om" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs-Attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "DGteZrfyaG" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from issues", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "qt6slX4nKG" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when an issue is commented on", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "L3vAavBKfc" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Issue-Feature" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Issue-Bug" - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "Xd4jbMkIow" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 1, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 2, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 3, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 4, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 5, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 6, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "No-Recent-Activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue 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**." - } - } - ] - }, - "id": "HV08M412DE" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 1, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 2, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 3, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 4, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 5, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 6, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -8 - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Resolution-Duplicate" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 1 - } - } - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes." - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Triage" - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "hgrKGLnvNe" - }, - { - "taskType": "trigger", - "capabilityId": "CodeFlowLink", - "subCapability": "CodeFlowLink", - "version": "1.0", - "config": { - "taskName": "Add a CodeFlow link to new pull requests" - }, - "id": "FPCq8HJP8B" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Add needs author feedback label to pull requests when changes are requested", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "submitted" - } - }, - { - "name": "isReviewState", - "parameters": { - "state": "changes_requested" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "JziRB5iiC0" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "2z-l8t56EO" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author comments on a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "ooR8PwcfKR" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request review comment", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "AgzZls4j5S" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from pull requests", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "XZ8oe8dVlY" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is commented on", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "X78vCRTO1G" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is reviewed", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "Waip1ubUSj" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 1, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 2, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 3, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 4, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 5, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 6, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -8 - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "No-Recent-Activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "_0YjIJ3ujh" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 4, - 10, - 16, - 22 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "No-Recent-Activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "No-Recent-Activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "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**." - } - } - ] - }, - "id": "D2HMpoUDWT7" - }, - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "Automatically merge pull requests", - "label": "AutoMerge", - "silentMode": false, - "minMinutesOpen": 480, - "mergeType": "squash", - "deleteBranches": true, - "removeLabelOnPush": true, - "allowAutoMergeInstructionsWithoutLabel": true, - "enforceDMPAsStatus": true, - "usePrDescriptionAsCommitMessage": true - }, - "id": "ft42y57kUcb" - }, - { - "taskType": "trigger", - "capabilityId": "InPrLabel", - "subCapability": "InPrLabel", - "version": "1.0", - "config": { - "fixedLabelEnabled": true, - "taskName": "Label PRs and mark fix committed automatically", - "label_inPr": "In-PR", - "label_fixed": "Resolution-Fix-Committed" - }, - "id": "UhbrnxeiCRD" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "name": "isAction", - "parameters": { - "action": "reopened" - } - } - ] - }, - { - "operator": "or", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "bodyContains", - "parameters": { - "bodyPattern": ".+", - "isRegex": true - } - } - ] - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Close issues with nothing in the body", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "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. " - } - } - ] - }, - "id": "_m2Ui25mVPn" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isLabeled", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Feedback-Hub" - } - }, - { - "name": "", - "parameters": {} - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Ask for Feedback Hub link", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi there!

\nCan you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

\nThanks!

\nFor Category use \"Apps\" and \"Windows Package Manager Create\"

\nGet the link to the feedback item with the \"Share\" button." - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Feedback-Hub" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "id": "oSBxUDUS2EV" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "In-PR" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Help-Wanted" - } - }, - { - "name": "isLabeled", - "parameters": {} - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Pull the Help-Wanted tag if something goes into PR", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Help-Wanted" - } - } - ], - "dangerZone": { - "respondToBotActions": false, - "acceptRespondToBotActions": true - } - }, - "id": "7ylUxhruNL5" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "bodyPattern": "/dup", - "isRegex": true, - "commentPattern": "Duplicate\\s+of\\s+#?\\s*\\d+" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Helper to mark as duplicate", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Be sure to add your 👍 to that issue. Thanks for your report!" - } - }, - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Triage" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Resolution-Duplicate" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "id": "CDPGCfrTGm3" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "\\/feedback", - "isRegex": true - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Ask for Feedback Hub link via comment trigger", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

![image](https://user-images.githubusercontent.com/18221333/62478757-b69d0d00-b760-11e9-9626-1fa33c91e7c5.png) ![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs-Author-Feedback" - } - } - ] - }, - "id": "xCTzSEDF4I_" - }, - { - "taskType": "trigger", - "capabilityId": "EmailCleanser", - "subCapability": "EmailCleanser", - "version": "1.0", - "config": { - "taskName": "Scrub-a-dub-dub email replies" - }, - "id": "japYzSibG-8" - }, - { - "taskType": "trigger", - "capabilityId": "LabelSync", - "subCapability": "LabelSync", - "version": "1.0", - "config": { - "taskName": "Syncy dinky doo", - "labelPatterns": [ - { - "pattern": "Issue-" - }, - { - "pattern": "Area-" - }, - { - "pattern": "Priority-" - }, - { - "pattern": "Product-" - }, - { - "pattern": "Severity-" - }, - { - "pattern": "Impact-" - } - ] - }, - "id": "UxODYGeL-JC" - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..6ff4b1c9 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,331 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: Needs-Author-Feedback + - hasLabel: + label: No-Recent-Activity + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: Issue-Feature + - isNotLabeledWith: + label: Issue-Bug + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: Needs-Author-Feedback + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: No-Recent-Activity + actions: + - addLabel: + label: No-Recent-Activity + - 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 **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: Resolution-Duplicate + - noActivitySince: + days: 1 + actions: + - 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. + - removeLabel: + label: Needs-Triage + - closeIssue + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: Needs-Author-Feedback + - hasLabel: + label: No-Recent-Activity + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: Needs-Author-Feedback + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: No-Recent-Activity + actions: + - addLabel: + label: No-Recent-Activity + - 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**. + eventResponderTasks: + - if: + - payloadType: Issues + - or: + - and: + - isAction: + action: Opened + then: + - addLabel: + label: Needs-Triage + description: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author-Feedback + then: + - addLabel: + label: Needs-Attention + - removeLabel: + label: Needs-Author-Feedback + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + then: + - addCodeFlowLink + description: + - if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: True + - not: + isAction: + action: Closed + - hasLabel: + label: Needs-Author-Feedback + then: + - removeLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author-Feedback + then: + - removeLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author-Feedback + then: + - removeLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + description: + - if: + - payloadType: Pull_Request + - hasLabel: + label: AutoMerge + then: + - enableAutoMerge: + mergeMethod: Squash + description: + - if: + - payloadType: Pull_Request + - labelRemoved: + label: AutoMerge + then: + - disableAutoMerge + description: + - if: + - payloadType: Pull_Request + then: + - inPrLabel: + label: In-PR + description: + - if: + - payloadType: Issues + - or: + - isAction: + action: Opened + - isAction: + action: Reopened + - or: + - not: + bodyContains: + pattern: .+ + isRegex: True + then: + - closeIssue + - addLabel: + label: Needs-Author-Feedback + - 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. " + description: + - if: + - payloadType: Issues + - hasLabel: + label: In-PR + - hasLabel: + label: Help-Wanted + - isLabeled + then: + - removeLabel: + label: Help-Wanted + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: Duplicate\s+of\s+\#?\s*\d+ + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: "Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Be sure to add your \U0001F44D to that issue. Thanks for your report!" + - closeIssue + - removeLabel: + label: Needs-Triage + - addLabel: + label: Resolution-Duplicate + - removeLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/feedback' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

![image](https://user-images.githubusercontent.com/18221333/62478757-b69d0d00-b760-11e9-9626-1fa33c91e7c5.png) ![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png) + - addLabel: + label: Needs-Author-Feedback + description: + - if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + description: + - if: + - payloadType: Pull_Request + then: + - labelSync: + pattern: Issue- + - labelSync: + pattern: Area- + - labelSync: + pattern: Priority- + - labelSync: + pattern: Product- + - labelSync: + pattern: Severity- + - labelSync: + pattern: Impact- + description: +onFailure: +onSuccess: