From 70a5efc3d57201c8b048314d213bbab253977578 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, 6 Jul 2023 13:53:57 +0000 Subject: [PATCH 1/2] Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement Owners of the FabricBot configuration should have received email notification. The same information contained in the email is published internally at: https://aka.ms/gim/fabricbot. Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html Please review and merge this PR to complete the process of onboarding to the new service. --- .github/policies/resourceManagement.yml | 393 ++++++++++++++++++++++++ 1 file changed, 393 insertions(+) create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 0000000..bc9093f --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,393 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - daily: + time: 1:0 + filters: + - isIssue + - isOpen + - hasLabel: + label: needs-author-feedback + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 14 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: needs-author-feedback + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: Hi, we're sending this friendly reminder because we haven't heard back from you in **7 days**. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within **14 days** of this comment the issue will be automatically closed. Thank you! + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: issue-addressed + - noActivitySince: + days: 7 + actions: + - addReply: + reply: Hi @${issueAuthor}, since you haven’t asked that we “`/unresolve`” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “`/unresolve`” to reopen the issue. + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isOpen + - hasLabel: + label: no-recent-activity + - isPullRequest + - noActivitySince: + days: 7 + actions: + - closeIssue + - addReply: + reply: "Hi @${issueAuthor}. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing \"/reopen\" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the \"no-recent-activity\" label; otherwise, this is likely to be closed again with the next cleanup pass. " + - description: + frequencies: + - weekday: + day: Friday + time: 5:0 + filters: + - isOpen + - isNotLabeledWith: + label: no-recent-activity + - noActivitySince: + days: 60 + - isPullRequest + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: Hi @${issueAuthor}. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. + eventResponderTasks: + - if: + - payloadType: Pull_Request + - hasLabel: + label: auto-merge + then: + - enableAutoMerge: + mergeMethod: Squash + description: + - if: + - payloadType: Pull_Request + - labelRemoved: + label: auto-merge + then: + - disableAutoMerge + description: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: needs-author-feedback + - isOpen + then: + - addLabel: + label: needs-team-attention + - removeLabel: + label: needs-author-feedback + 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: Issues + - isAction: + action: Opened + - and: + - not: + activitySenderHasPermission: + permission: Write + - not: + activitySenderHasAssociation: + association: Member + - not: + activitySenderHasAssociation: + association: Collaborator + - not: + activitySenderHasPermission: + permission: Admin + then: + - addLabel: + label: customer-reported + - addLabel: + label: question + description: + - if: + - payloadType: Issues + - isAction: + action: Labeled + - labelAdded: + label: needs-author-feedback + then: + - removeLabel: + label: needs-team-attention + - removeLabel: + label: needs-triage + - removeLabel: + label: needs-team-triage + description: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + - and: + - not: + activitySenderHasPermission: + permission: Write + - not: + activitySenderHasAssociation: + association: Member + - not: + activitySenderHasAssociation: + association: Collaborator + - not: + activitySenderHasPermission: + permission: Admin + then: + - addLabel: + label: customer-reported + - addReply: + reply: Thank you for your contribution @${issueAuthor}! We will review the pull request and get back to you soon. + - addLabel: + label: Community Contribution + description: + - if: + - payloadType: Issues + - isAction: + action: Labeled + - not: + hasLabel: + label: needs-triage + - not: + hasLabel: + label: needs-team-triage + - not: + hasLabel: + label: needs-author-feedback + - hasLabel: + label: customer-reported + - not: + isInMilestone: + milestone: '' + - isOpen + - not: + hasLabel: + label: issue-addressed + then: + - addLabel: + label: needs-team-attention + description: + - if: + - payloadType: Pull_Request + - isOpen + - hasLabel: + label: auto-merge + - isAction: + action: Synchronize + - and: + - not: + activitySenderHasPermission: + permission: Admin + - not: + activitySenderHasPermission: + permission: Write + then: + - dismissPullRequestReview: + message: Hi @{issueAuthor}. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates. + description: + - if: + - payloadType: Issues + - isOpen + - hasLabel: + label: issue-addressed + - or: + - labelAdded: + label: needs-team-attention + - labelAdded: + label: needs-author-feedback + - labelAdded: + label: Service Attention + - labelAdded: + label: needs-triage + - labelAdded: + label: needs-team-triage + then: + - removeLabel: + label: issue-addressed + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: issue-addressed + - commentContains: + pattern: /unresolve + isRegex: False + - and: + - not: + isActivitySender: + issueAuthor: True + - not: + activitySenderHasPermission: + permission: Admin + - not: + activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: Hi ${contextualAuthor}, only the original author of the issue can ask that it be unresolved. Please open a new issue with your scenario and details if you would like to discuss this topic with the team. + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: issue-addressed + - commentContains: + pattern: /unresolve + isRegex: False + - or: + - isActivitySender: + issueAuthor: True + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - reopenIssue + - removeLabel: + label: issue-addressed + - addLabel: + label: needs-team-attention + description: + - if: + - payloadType: Issues + - labelAdded: + label: issue-addressed + then: + - addReply: + reply: Hi @${issueAuthor}. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “`/unresolve`” to remove the “issue-addressed” label and continue the conversation. + - removeLabel: + label: needs-triage + - removeLabel: + label: needs-team-triage + - removeLabel: + label: needs-team-attention + - removeLabel: + label: needs-author-feedback + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + - hasLabel: + label: no-recent-activity + - isOpen + - or: + - isAction: + action: Null + - isAction: + action: Synchronize + - isAction: + action: Null + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: no-recent-activity + - isOpen + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - hasLabel: + label: no-recent-activity + - isOpen + - and: + - not: + commentContains: + pattern: What is Check Enforcer? + isRegex: False + - not: + commentContains: + pattern: Since there hasn't been recent engagement, this is being closed out. + isRegex: False + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - not: isOpen + - commentContains: + pattern: /reopen + isRegex: False + - hasLabel: + label: no-recent-activity + - or: + - isActivitySender: + issueAuthor: True + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - reopenIssue + - removeLabel: + label: no-recent-activity + description: +onFailure: +onSuccess: From 37f0000253c30281d65f66c969910ded68249f0c 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, 6 Jul 2023 13:53:58 +0000 Subject: [PATCH 2/2] Deleting fabricbot.json --- .github/fabricbot.json | 1749 ---------------------------------------- 1 file changed, 1749 deletions(-) delete mode 100644 .github/fabricbot.json diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 2bce4b4..0000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,1749 +0,0 @@ -[ - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "Auto merge pull requests", - "label": "auto-merge", - "allowAutoMergeInstructionsWithoutLabel": false, - "mergeType": "squash", - "deleteBranches": true, - "removeLabelOnPush": true, - "requireAllStatuses": false, - "requireSpecificCheckRuns": false, - "usePrDescriptionAsCommitMessage": true, - "conditionalMergeTypes": [] - } - }, - { - "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" - } - }, - { - "name": "isOpen", - "parameters": {} - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "needs-team-attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - } - }, - { - "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" - ] - } - }, - { - "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" - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 1 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 1 - ], - "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": 14 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to 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": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Hi, we're sending this friendly reminder because we haven't heard back from you in **7 days**. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within **14 days** of this comment the issue will be automatically closed. Thank you!" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "association": "MEMBER", - "permissions": "write" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "association": "MEMBER" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "association": "COLLABORATOR" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add customer-reported label to issues coming from non-collaborators", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "customer-reported" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "question" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "needs-author-feedback" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "For issues closed due to inactivity, re-open an issue if issue author posts a reply within 7 days.", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-author-feedback" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "needs-team-attention" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "For issues closed with no activity over 7 days, ask non-contributor to consider opening a new issue instead.", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thank you for your interest in this issue! Because it has been closed for a period of time, we strongly advise that you open a new issue linking to this to ensure better visibility of your comment. " - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "labeled" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove needs* labels when needs-author-feedback label is added", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "needs-team-attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-triage" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-team-triage" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "association": "MEMBER" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "association": "COLLABORATOR" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Add customer-reported label to PRs from customers ", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "customer-reported" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Thank you for your contribution @${issueAuthor}! We will review the pull request and get back to you soon." - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Community Contribution" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "labeled" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "needs-triage" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "needs-team-triage" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "needs-author-feedback" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "customer-reported" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isInMilestone", - "parameters": {} - } - ] - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "issue-addressed" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Ensure 'needs-team-attention' label is assigned to issues not in a milestone", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "needs-team-attention" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "auto-merge" - } - }, - { - "name": "isAction", - "parameters": { - "action": "synchronize" - } - }, - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[Auto Merge] Reset Approvals on Untrusted Changes", - "actions": [ - { - "name": "dismissApprovalPullRequest", - "parameters": { - "dismissAction": "dismissAll", - "comment": "Hi @{issueAuthor}. We've noticed that new changes have been pushed to this pull request. Because it is set to automatically merge, we've reset the approvals to allow the opportunity to review the updates." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "issue-addressed" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "needs-team-attention" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "needs-author-feedback" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "Service Attention" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "needs-triage" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "needs-team-triage" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Resolve Workflow] Unresolve on WIP Labels", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "issue-addressed" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "issue-addressed" - } - }, - { - "name": "commentContains", - "parameters": { - "commentPattern": "/unresolve" - } - }, - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Resolve Workflow] Unresolve Command Without Permissions", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi ${contextualAuthor}, only the original author of the issue can ask that it be unresolved. Please open a new issue with your scenario and details if you would like to discuss this topic with the team." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "issue-addressed" - } - }, - { - "name": "commentContains", - "parameters": { - "commentPattern": "/unresolve" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Resolve Workflow] Unresolve Command by Author", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "issue-addressed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "needs-team-attention" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 1, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 2, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 3, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 4, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 5, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 6, - "hours": [ - 0, - 6, - 12, - 18 - ], - "timezoneOffset": -4 - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "issue-addressed" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "taskName": "[Resolve Workflow] Close Addressed Issues", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}, since you haven’t asked that we “`/unresolve`” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “`/unresolve`” to reopen the issue." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "issue-addressed" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Resolve Workflow] Issue Addressed Label Applied", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “`/unresolve`” to remove the “issue-addressed” label and continue the conversation." - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-triage" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-team-triage" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-team-attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "needs-author-feedback" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "merged" - } - }, - { - "name": "isAction", - "parameters": { - "action": "synchronize" - } - }, - { - "name": "isAction", - "parameters": { - "action": "review_requested" - } - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[Stale Pull Requests] Remove Stale PR Designation on Activity", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "isOpen", - "parameters": {} - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ], - "taskName": "[Stale Pull Requests] Remove Stale PR Designation on on Review", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "What is Check Enforcer?" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "commentContains", - "parameters": { - "commentPattern": "Since there hasn't been recent engagement, this is being closed out." - } - } - ] - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Stale Pull Requests] Remove Stale PR Designation on on Comment", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ], - "timezoneOffset": -4 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "isPr", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "taskName": "[Stale Pull Requests] Scheduled Close for Stale PRs", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing \"/reopen\" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the \"no-recent-activity\" label; otherwise, this is likely to be closed again with the next cleanup pass. " - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "commentContains", - "parameters": { - "commentPattern": "/reopen" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Stale Pull Requests] Reopen Command", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 5, - "hours": [ - 5 - ], - "timezoneOffset": -5 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 60 - } - }, - { - "name": "isPr", - "parameters": {} - } - ], - "taskName": "[Stale Pull Requests] Scheduled Marking of Stale PRs", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days." - } - } - ] - } - } -]