From 133318c1c401ef7dc5384a09850d903d6a436ddf Mon Sep 17 00:00:00 2001 From: Eirik Tsarpalis Date: Fri, 15 Apr 2022 19:29:28 +0100 Subject: [PATCH] Use no-recent-activity in inactive Draft PRs (#66771) --- .github/fabricbot.json | 237 ++++++++++++++++++++++++++----------------------- 1 file changed, 125 insertions(+), 112 deletions(-) diff --git a/.github/fabricbot.json b/.github/fabricbot.json index 0e3a8b8..a8a9b91 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -1616,7 +1616,7 @@ "subCapability": "ScheduledSearch", "version": "1.1", "config": { - "taskName": "Add no-recent-activity label to PRs", + "taskName": "Add no-recent-activity label to needs-author-action PRs", "frequency": [ { "weekDay": 0, @@ -1735,6 +1735,130 @@ "disabled": false }, { + "taskType": "scheduled", + "capabilityId": "ScheduledSearch", + "subCapability": "ScheduledSearch", + "version": "1.1", + "config": { + "taskName": "Add no-recent-activity label to Draft PRs", + "frequency": [ + { + "weekDay": 0, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 1, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 2, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 3, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 4, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 5, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + }, + { + "weekDay": 6, + "hours": [ + 4, + 10, + 16, + 22 + ], + "timezoneOffset": 1 + } + ], + "searchTerms": [ + { + "name": "isPr", + "parameters": {} + }, + { + "name": "isOpen", + "parameters": {} + }, + { + "name": "isDraftPr", + "parameters": { + "value": "true" + } + }, + { + "name": "noActivitySince", + "parameters": { + "days": 14 + } + }, + { + "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 `no-recent-activity` because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove `no-recent-activity`." + } + } + ] + }, + "disabled": false + }, + { "taskType": "trigger", "capabilityId": "InPrLabel", "subCapability": "InPrLabel", @@ -1861,117 +1985,6 @@ } }, { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 1, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 2, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 3, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 4, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 5, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - }, - { - "weekDay": 6, - "hours": [ - 5, - 11, - 17, - 23 - ], - "timezoneOffset": 0 - } - ], - "searchTerms": [ - { - "name": "isDraftPr", - "parameters": { - "value": "true" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - } - ], - "taskName": "Close inactive Draft PRs", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "addReply", - "parameters": { - "comment": "Draft Pull Request was automatically closed for inactivity. Please [let us know](https://github.com/dotnet/runtime/blob/main/docs/area-owners.md) if you'd like to reopen it." - } - } - ] - } - }, - { "taskType": "trigger", "capabilityId": "IssueResponder", "subCapability": "PullRequestResponder", -- 2.7.4