From 7c39f39c6917c53ad81a5437a4549bb337f81fed Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:49:59 -0700 Subject: [PATCH] Onboarding to GitOps.ResourceManagement (#10202) * Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement * Deleting fabricbot.json --------- Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> --- .github/fabricbot.json | 833 ------------------------ .github/policies/resourceManagement.yml | 220 +++++++ 2 files changed, 220 insertions(+), 833 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 450ec7e5..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,833 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "jeBIDtucz", - "config": { - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - }, - "taskName": "Replace needs author feedback label with needs attention label when the author comments on an issue", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale 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": "needs-author-feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been automatically closed since it has not had any author activity for the past **7 days**. If you're still experiencing this issue please re-open it. \n\nThank you!" - } - } - ] - }, - "id": "8L3NhlWcf" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 1, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 2, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 3, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 4, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 5, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 6, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "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 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**. Thank you for your contributions to WSL!" - } - } - ] - }, - "id": "ee1UHNVW95", - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "1w4kQj_7F", - "config": { - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "need-repro" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "taskName": "Need-Repro Auto response", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "We’ve labelled your issue as ‘need-repro’ since we need more steps to help identify your problem. Could you please provide us with reproducible steps for the issue you’re experiencing, including things such as the specific command line steps necessary to reproduce the behavior and their output. Thank you! -The WSL Team" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "FhC7atb7p", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "craigloewen-msft" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "therealkenc" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "benhillis" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "needs-attention" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Remove needs attention when commenting", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "needs-attention" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "bodyPattern": "/dup", - "isRegex": true, - "commentPattern": "\\/dup(licate|e)?(\\s+of)?\\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 in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.\n\nThanks for your report!" - } - }, - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addLabel", - "parameters": { - "label": "duplicate" - } - } - ] - }, - "id": "GNVFUp_2Q" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "wsAGPfUzN", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "\\/need-repro", - "isRegex": true - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Need-Repro Auto response", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "We’ve labelled your issue as ‘need-repro’ since we need more steps to help identify your problem. \n\nCould you please provide us with reproducible steps for the issue you’re experiencing, including things such as the specific command line steps necessary to reproduce the behavior and their output. \n\nThank you!" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "need-repro" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "EmailCleanser", - "subCapability": "EmailCleanser", - "version": "1.0", - "id": "Lf58JEJUS", - "config": { - "taskName": "Email reply cleanser" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "C1A9D30HD", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "\\/template", - "isRegex": true - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Close and ask for resubmit for incomplete template", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "Hi! We've closed your issue since you haven't used the template, or it is incomplete. Could you please provide all the requested info in the bug template and resubmit? Having that information will help us be able to accurately diagnose and resolve your issue.\n\nThank you!" - } - }, - { - "name": "lockIssue" - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "Ekqq5mlWJ", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "\\/fixed", - "isRegex": true - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Mark as fixed", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addLabel", - "parameters": { - "label": "fixedininsiderbuilds" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This bug or feature request originally submitted has been addressed in whole or in part. Related or ongoing bug or feature gaps should be opened as a new issue submission if one does not already exist. \n\nThank you!" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "fixinbound" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "id": "C-WVr8A2h", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "isRegex": true, - "commentPattern": "\\/logs?" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Ask for logs", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello! Could you please provide more logs to help us better diagnose your issue? \n\nTo collect WSL logs, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**:\n\n```\nInvoke-WebRequest -UseBasicParsing \"https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1\" -OutFile collect-wsl-logs.ps1\nSet-ExecutionPolicy Bypass -Scope Process -Force\n.\\collect-wsl-logs.ps1\n```\nThe scipt will output the path of the log file once done. \n\nOnce completed please upload the output files to this Github issue.\n\n[Click here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) for more info on logging\n\nThank you!" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "\\/dump?", - "isRegex": true - } - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Ask for dumps", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello! Could you please provide logs and process dumps to help us better diagnose your issue? \n\nTo collect WSL logs and dumps, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**:\n\n```\nInvoke-WebRequest -UseBasicParsing \"https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1\" -OutFile collect-wsl-logs.ps1\nSet-ExecutionPolicy Bypass -Scope Process -Force\n.\\collect-wsl-logs.ps1 -Dump\n```\nThe scipt will output the path of the log file once done. \n\nOnce completed please upload the output files to this Github issue.\n\n[Click here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) for more info on logging\n\nThank you!" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - }, - "disabled": false - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..ffc24800 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,220 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 3 + filters: + - isIssue + - isOpen + - hasLabel: + label: needs-author-feedback + - noActivitySince: + days: 7 + actions: + - closeIssue + - addReply: + reply: >- + This issue has been automatically closed since it has not had any author activity for the past **7 days**. If you're still experiencing this issue please re-open it. + + + Thank you! + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-author-feedback + then: + - removeLabel: + label: needs-author-feedback + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/dup(licate|e)?(\s+of)?\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 in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. + + + Thanks for your report! + - closeIssue + - addLabel: + label: duplicate + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/need-repro' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: >- + We’ve labelled your issue as ‘need-repro’ since we need more steps to help identify your problem. + + + Could you please provide us with reproducible steps for the issue you’re experiencing, including things such as the specific command line steps necessary to reproduce the behavior and their output. + + + Thank you! + - addLabel: + label: need-repro + description: + - if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/template' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - closeIssue + - addReply: + reply: >- + Hi! We've closed your issue since you haven't used the template, or it is incomplete. Could you please provide all the requested info in the bug template and resubmit? Having that information will help us be able to accurately diagnose and resolve your issue. + + + Thank you! + - lockIssue + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/fixed' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - closeIssue + - addLabel: + label: fixedininsiderbuilds + - addReply: + reply: >- + This bug or feature request originally submitted has been addressed in whole or in part. Related or ongoing bug or feature gaps should be opened as a new issue submission if one does not already exist. + + + Thank you! + - removeLabel: + label: fixinbound + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/logs?' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: >- + Hello! Could you please provide more logs to help us better diagnose your issue? + + + To collect WSL logs, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: + + + ``` + + Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 + + Set-ExecutionPolicy Bypass -Scope Process -Force + + .\collect-wsl-logs.ps1 + + ``` + + The scipt will output the path of the log file once done. + + + Once completed please upload the output files to this Github issue. + + + [Click here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) for more info on logging + + + Thank you! + - addLabel: + label: needs-author-feedback + description: + - if: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/dump?' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: >- + Hello! Could you please provide logs and process dumps to help us better diagnose your issue? + + + To collect WSL logs and dumps, download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: + + + ``` + + Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 + + Set-ExecutionPolicy Bypass -Scope Process -Force + + .\collect-wsl-logs.ps1 -Dump + + ``` + + The scipt will output the path of the log file once done. + + + Once completed please upload the output files to this Github issue. + + + [Click here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) for more info on logging + + + Thank you! + - addLabel: + label: needs-author-feedback + description: +onFailure: +onSuccess: