Use no-recent-activity in inactive Draft PRs (#66771)
authorEirik Tsarpalis <eirik.tsarpalis@gmail.com>
Fri, 15 Apr 2022 18:29:28 +0000 (19:29 +0100)
committerGitHub <noreply@github.com>
Fri, 15 Apr 2022 18:29:28 +0000 (19:29 +0100)
.github/fabricbot.json

index 0e3a8b8..a8a9b91 100644 (file)
     "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,
     "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",
     }
   },
   {
-    "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",