Repository: DefinitelyTyped/dt-mergebot
Pull request #345 (2021-01-20 20:28:48)

Remove some unused exports
Pedantic.


Patch:
diff --git a/package-lock.json b/package-lock.json
index 71f3c10..4c2b395 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,26 +10,25 @@
       "license": "MIT",
       "dependencies": {
         "@apollo/client": "^3.3.6",
-        "@azure/functions": "^1.2.2",
         "@definitelytyped/header-parser": "^0.0.64",
-        "@octokit/graphql-schema": "^10.11.0",
         "@octokit/webhooks": "^7.21.0",
-        "@types/node": "latest",
-        "@types/node-fetch": "^2.5.7",
-        "@types/prettyjson": "^0.0.29",
         "dayjs": "^1.10.3",
         "fast-json-patch": "^3.0.0-1",
         "fs-extra": "^9.0.1",
         "graphql": "^14.5.8",
         "node-fetch": "^2.6.1",
         "prettyjson": "^1.2.1",
-        "typescript": "^4.1.3",
         "yargs": "^16.2.0"
       },
       "devDependencies": {
+        "@azure/functions": "^1.2.2",
         "@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2",
+        "@octokit/graphql-schema": "^10.11.0",
         "@types/fs-extra": "^4.0.11",
         "@types/jest": "^26.0.20",
+        "@types/node": "latest",
+        "@types/node-fetch": "^2.5.7",
+        "@types/prettyjson": "^0.0.29",
         "@typescript-eslint/eslint-plugin": "^4.9.0",
         "@typescript-eslint/parser": "^4.9.0",
         "apollo": "^2.32.0",
@@ -37,7 +36,8 @@
         "eslint-plugin-unicorn": "^26.0.1",
         "jest": "^26.4.4",
         "jest-file-snapshot": "^0.3.8",
-        "ts-jest": "^26.4.4"
+        "ts-jest": "^26.4.4",
+        "typescript": "^4.1.3"
       },
       "engines": {
         "node": ">=10.0.0"
@@ -157,7 +157,8 @@
     "node_modules/@azure/functions": {
       "version": "1.2.2",
       "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-1.2.2.tgz",
-      "integrity": "sha512-p/dDHq1sG/iAib+eDY4NxskWHoHW1WFzD85s0SfWxc2wVjJbxB0xz/zBF4s7ymjVgTu+0ceipeBk+tmpnt98oA=="
+      "integrity": "sha512-p/dDHq1sG/iAib+eDY4NxskWHoHW1WFzD85s0SfWxc2wVjJbxB0xz/zBF4s7ymjVgTu+0ceipeBk+tmpnt98oA==",
+      "dev": true
     },
     "node_modules/@babel/code-frame": {
       "version": "7.12.11",
@@ -2327,9 +2328,10 @@
       }
     },
     "node_modules/@octokit/graphql-schema": {
-      "version": "10.16.0",
-      "resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-10.16.0.tgz",
-      "integrity": "sha512-crAEJMT8xzFKN79llMHrBI1YmZiegv4rYWepBx5QszO2E7xaZOl+a3ms+W3IfLXyYVIUxhW/GNvgATHC5Y9s5A=="
+      "version": "10.17.0",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-10.17.0.tgz",
+      "integrity": "sha512-UVD+MHe/qK0VEolv63dohUVMDplqhithgGebogzRk+ZdjkhWWDRwdD6au/pn/7k4iSTxx/Qk1O48VzCT5TjTTA==",
+      "dev": true
     },
     "node_modules/@octokit/openapi-types": {
       "version": "2.3.1",
@@ -2497,20 +2499,21 @@
       }
     },
     "node_modules/@types/json-schema": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
-      "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==",
+      "version": "7.0.7",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+      "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
       "dev": true
     },
     "node_modules/@types/node": {
-      "version": "14.14.21",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz",
-      "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A=="
+      "version": "14.14.22",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
+      "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
     },
     "node_modules/@types/node-fetch": {
       "version": "2.5.8",
       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
       "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
+      "dev": true,
       "dependencies": {
         "@types/node": "*",
         "form-data": "^3.0.0"
@@ -2543,7 +2546,8 @@
     "node_modules/@types/prettyjson": {
       "version": "0.0.29",
       "resolved": "https://registry.npmjs.org/@types/prettyjson/-/prettyjson-0.0.29.tgz",
-      "integrity": "sha512-Zu4jAKE46yc6R8JrVkCBWbXhs18dUgI/JlbID4jziFgUBgEdAHxFekR5TlEnk9phHdGE80QlCznRBaxlk0rl7w=="
+      "integrity": "sha512-Zu4jAKE46yc6R8JrVkCBWbXhs18dUgI/JlbID4jziFgUBgEdAHxFekR5TlEnk9phHdGE80QlCznRBaxlk0rl7w==",
+      "dev": true
     },
     "node_modules/@types/stack-utils": {
       "version": "2.0.0",
@@ -2735,9 +2739,9 @@
       }
     },
     "node_modules/@ungap/global-this": {
-      "version": "0.4.3",
-      "resolved": "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.3.tgz",
-      "integrity": "sha512-MuHEpDBurNVeD6mV9xBcAN2wfTwuaFQhHuhWkJuXmyVJ5P5sBCw+nnFpdfb0tAvgWkfefWCsAoAsh7MTUr3LPg=="
+      "version": "0.4.4",
+      "resolved": "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.4.tgz",
+      "integrity": "sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA=="
     },
     "node_modules/@wry/context": {
       "version": "0.5.3",
@@ -3516,7 +3520,8 @@
     "node_modules/asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+      "dev": true
     },
     "node_modules/at-least-node": {
       "version": "1.0.0",
@@ -4649,6 +4654,7 @@
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
       "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "dev": true,
       "dependencies": {
         "delayed-stream": "~1.0.0"
       },
@@ -4920,6 +4926,7 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
       "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "dev": true,
       "engines": {
         "node": ">=0.4.0"
       }
@@ -6254,6 +6261,7 @@
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz",
       "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==",
+      "dev": true,
       "dependencies": {
         "asynckit": "^0.4.0",
         "combined-stream": "^1.0.8",
@@ -10230,6 +10238,7 @@
       "version": "1.45.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
       "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
+      "dev": true,
       "engines": {
         "node": ">= 0.6"
       }
@@ -10238,6 +10247,7 @@
       "version": "2.1.28",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
       "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
+      "dev": true,
       "dependencies": {
         "mime-db": "1.45.0"
       },
@@ -13181,6 +13191,7 @@
       "version": "4.1.3",
       "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
       "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
+      "dev": true,
       "bin": {
         "tsc": "bin/tsc",
         "tsserver": "bin/tsserver"
@@ -13930,7 +13941,8 @@
     "@azure/functions": {
       "version": "1.2.2",
       "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-1.2.2.tgz",
-      "integrity": "sha512-p/dDHq1sG/iAib+eDY4NxskWHoHW1WFzD85s0SfWxc2wVjJbxB0xz/zBF4s7ymjVgTu+0ceipeBk+tmpnt98oA=="
+      "integrity": "sha512-p/dDHq1sG/iAib+eDY4NxskWHoHW1WFzD85s0SfWxc2wVjJbxB0xz/zBF4s7ymjVgTu+0ceipeBk+tmpnt98oA==",
+      "dev": true
     },
     "@babel/code-frame": {
       "version": "7.12.11",
@@ -15718,9 +15730,10 @@
       "dev": true
     },
     "@octokit/graphql-schema": {
-      "version": "10.16.0",
-      "resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-10.16.0.tgz",
-      "integrity": "sha512-crAEJMT8xzFKN79llMHrBI1YmZiegv4rYWepBx5QszO2E7xaZOl+a3ms+W3IfLXyYVIUxhW/GNvgATHC5Y9s5A=="
+      "version": "10.17.0",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-10.17.0.tgz",
+      "integrity": "sha512-UVD+MHe/qK0VEolv63dohUVMDplqhithgGebogzRk+ZdjkhWWDRwdD6au/pn/7k4iSTxx/Qk1O48VzCT5TjTTA==",
+      "dev": true
     },
     "@octokit/openapi-types": {
       "version": "2.3.1",
@@ -15877,20 +15890,21 @@
       }
     },
     "@types/json-schema": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
-      "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==",
+      "version": "7.0.7",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+      "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
       "dev": true
     },
     "@types/node": {
-      "version": "14.14.21",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz",
-      "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A=="
+      "version": "14.14.22",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
+      "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
     },
     "@types/node-fetch": {
       "version": "2.5.8",
       "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.8.tgz",
       "integrity": "sha512-fbjI6ja0N5ZA8TV53RUqzsKNkl9fv8Oj3T7zxW7FGv1GSH7gwJaNF8dzCjrqKaxKeUpTz4yT1DaJFq/omNpGfw==",
+      "dev": true,
       "requires": {
         "@types/node": "*",
         "form-data": "^3.0.0"
@@ -15923,7 +15937,8 @@
     "@types/prettyjson": {
       "version": "0.0.29",
       "resolved": "https://registry.npmjs.org/@types/prettyjson/-/prettyjson-0.0.29.tgz",
-      "integrity": "sha512-Zu4jAKE46yc6R8JrVkCBWbXhs18dUgI/JlbID4jziFgUBgEdAHxFekR5TlEnk9phHdGE80QlCznRBaxlk0rl7w=="
+      "integrity": "sha512-Zu4jAKE46yc6R8JrVkCBWbXhs18dUgI/JlbID4jziFgUBgEdAHxFekR5TlEnk9phHdGE80QlCznRBaxlk0rl7w==",
+      "dev": true
     },
     "@types/stack-utils": {
       "version": "2.0.0",
@@ -16041,9 +16056,9 @@
       }
     },
     "@ungap/global-this": {
-      "version": "0.4.3",
-      "resolved": "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.3.tgz",
-      "integrity": "sha512-MuHEpDBurNVeD6mV9xBcAN2wfTwuaFQhHuhWkJuXmyVJ5P5sBCw+nnFpdfb0tAvgWkfefWCsAoAsh7MTUr3LPg=="
+      "version": "0.4.4",
+      "resolved": "https://registry.npmjs.org/@ungap/global-this/-/global-this-0.4.4.tgz",
+      "integrity": "sha512-mHkm6FvepJECMNthFuIgpAEFmPOk71UyXuIxYfjytvFTnSDBIz7jmViO+LfHI/AjrazWije0PnSP3+/NlwzqtA=="
     },
     "@wry/context": {
       "version": "0.5.3",
@@ -16670,7 +16685,8 @@
     "asynckit": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+      "dev": true
     },
     "at-least-node": {
       "version": "1.0.0",
@@ -17581,6 +17597,7 @@
       "version": "1.0.8",
       "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
       "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "dev": true,
       "requires": {
         "delayed-stream": "~1.0.0"
       }
@@ -17800,7 +17817,8 @@
     "delayed-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+      "dev": true
     },
     "deprecation": {
       "version": "2.3.1",
@@ -18844,6 +18862,7 @@
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz",
       "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==",
+      "dev": true,
       "requires": {
         "asynckit": "^0.4.0",
         "combined-stream": "^1.0.8",
@@ -21916,12 +21935,14 @@
     "mime-db": {
       "version": "1.45.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
-      "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w=="
+      "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
+      "dev": true
     },
     "mime-types": {
       "version": "2.1.28",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
       "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
+      "dev": true,
       "requires": {
         "mime-db": "1.45.0"
       }
@@ -24247,7 +24268,8 @@
     "typescript": {
       "version": "4.1.3",
       "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz",
-      "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg=="
+      "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==",
+      "dev": true
     },
     "union-value": {
       "version": "1.0.1",
diff --git a/package.json b/package.json
index c12ba63..722c2ea 100644
--- a/package.json
+++ b/package.json
@@ -17,26 +17,25 @@
   },
   "dependencies": {
     "@apollo/client": "^3.3.6",
-    "@azure/functions": "^1.2.2",
     "@definitelytyped/header-parser": "^0.0.64",
-    "@octokit/graphql-schema": "^10.11.0",
     "@octokit/webhooks": "^7.21.0",
-    "@types/node": "latest",
-    "@types/node-fetch": "^2.5.7",
-    "@types/prettyjson": "^0.0.29",
     "dayjs": "^1.10.3",
     "fast-json-patch": "^3.0.0-1",
     "fs-extra": "^9.0.1",
     "graphql": "^14.5.8",
     "node-fetch": "^2.6.1",
     "prettyjson": "^1.2.1",
-    "typescript": "^4.1.3",
     "yargs": "^16.2.0"
   },
   "devDependencies": {
+    "@azure/functions": "^1.2.2",
     "@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2",
+    "@octokit/graphql-schema": "^10.11.0",
     "@types/fs-extra": "^4.0.11",
     "@types/jest": "^26.0.20",
+    "@types/node": "latest",
+    "@types/node-fetch": "^2.5.7",
+    "@types/prettyjson": "^0.0.29",
     "@typescript-eslint/eslint-plugin": "^4.9.0",
     "@typescript-eslint/parser": "^4.9.0",
     "apollo": "^2.32.0",
@@ -44,7 +43,8 @@
     "eslint-plugin-unicorn": "^26.0.1",
     "jest": "^26.4.4",
     "jest-file-snapshot": "^0.3.8",
-    "ts-jest": "^26.4.4"
+    "ts-jest": "^26.4.4",
+    "typescript": "^4.1.3"
   },
   "scripts": {
     "prepublishOnly": "npm run build",
diff --git a/src/compute-pr-actions.ts b/src/compute-pr-actions.ts
index 05dc10b..794c444 100644
--- a/src/compute-pr-actions.ts
+++ b/src/compute-pr-actions.ts
@@ -95,7 +95,7 @@ type Staleness = {
 type ApproverKind = "maintainer" | "owner" | "other";
 
 // used to pass around pr info with additional values
-export interface ExtendedPrInfo extends PrInfo {
+interface ExtendedPrInfo extends PrInfo {
     readonly orig: PrInfo;
     readonly editsInfra: boolean;
     readonly checkConfig: boolean;
diff --git a/src/execute-pr-actions.ts b/src/execute-pr-actions.ts
index 980ca64..85c2364 100644
--- a/src/execute-pr-actions.ts
+++ b/src/execute-pr-actions.ts
@@ -124,7 +124,7 @@ async function getProjectBoardColumnIdByName(name: string): Promise<string> {
     return res;
 }
 
-export async function getLabelIdByName(name: string): Promise<string> {
+async function getLabelIdByName(name: string): Promise<string> {
     const labels = await getLabels();
     const res = labels.find(l => l.name === name)?.id;
     if (!res) throw new Error(`No label named "${name}" exists`);
diff --git a/src/pr-info.ts b/src/pr-info.ts
index 59cd97a..17a27a1 100644
--- a/src/pr-info.ts
+++ b/src/pr-info.ts
@@ -30,7 +30,6 @@ export type PopularityLevel =
 interface BotError {
     readonly type: "error";
     readonly now: Date;
-    readonly pr_number: number;
     readonly message: string;
     readonly author: string | undefined;
 }
@@ -38,7 +37,6 @@ interface BotError {
 interface BotEnsureRemovedFromProject {
     readonly type: "remove";
     readonly now: Date;
-    readonly pr_number: number;
     readonly message: string;
     readonly isDraft: boolean;
 }
@@ -185,13 +183,13 @@ export async function deriveStateForPR(
     getDownloads = getMonthlyDownloadCount,
     now = new Date(),
 ): Promise<BotResult>  {
-    if (prInfo.author == null) return botError(prInfo.number, "PR author does not exist");
+    if (prInfo.author == null) return botError("PR author does not exist");
 
-    if (prInfo.isDraft) return botEnsureRemovedFromProject(prInfo.number, "PR is a draft", true);
-    if (prInfo.state !== PullRequestState.OPEN) return botEnsureRemovedFromProject(prInfo.number, "PR is not active", false);
+    if (prInfo.isDraft) return botEnsureRemovedFromProject("PR is a draft");
+    if (prInfo.state !== PullRequestState.OPEN) return botEnsureRemovedFromProject("PR is not active");
 
     const headCommit = getHeadCommit(prInfo);
-    if (headCommit == null) return botError(prInfo.number, "No head commit found");
+    if (headCommit == null) return botError("No head commit found");
 
     const author = prInfo.author.login;
     const isFirstContribution = prInfo.authorAssociation === CommentAuthorAssociation.FIRST_TIME_CONTRIBUTOR;
@@ -207,7 +205,7 @@ export async function deriveStateForPR(
     const pkgInfoEtc = await getPackageInfosEtc(
         noNullish(prInfo.files?.nodes).map(f => f.path).sort(),
         prInfo.headRefOid, fetchFile, async name => await getDownloads(name, lastPushDate));
-    if (pkgInfoEtc instanceof Error) return botError(prInfo.number, pkgInfoEtc.message);
+    if (pkgInfoEtc instanceof Error) return botError(pkgInfoEtc.message);
     const { pkgInfo, popularityLevel } = pkgInfoEtc;
 
     const reviews = getReviews(prInfo);
@@ -236,12 +234,12 @@ export async function deriveStateForPR(
         ...getCIResult(headCommit.checkSuites)
     };
 
-    function botError(pr_number: number, message: string): BotError {
-        return { type: "error", now, message, pr_number, author: prInfo.author?.login };
+    function botError(message: string): BotError {
+        return { type: "error", now, message, author: prInfo.author?.login };
     }
 
-    function botEnsureRemovedFromProject(pr_number: number, message: string, isDraft: boolean): BotEnsureRemovedFromProject {
-        return { type: "remove", now, pr_number, message, isDraft };
+    function botEnsureRemovedFromProject(message: string): BotEnsureRemovedFromProject {
+        return { type: "remove", now, message, isDraft: prInfo.isDraft };
     }
 }
 
diff --git a/src/util/comment.ts b/src/util/comment.ts
index bc14ad0..1ecf4f7 100644
--- a/src/util/comment.ts
+++ b/src/util/comment.ts
@@ -1,7 +1,7 @@
 import { Comment } from "../comments";
 
-export const prefix = "\n<!--typescript_bot_";
-export const suffix = "-->";
+const prefix = "\n<!--typescript_bot_";
+const suffix = "-->";
 
 export function parse(body: string): Comment | undefined {
     const start = body.lastIndexOf(prefix);
diff --git a/src/util/util.ts b/src/util/util.ts
index c403c58..9007241 100644
--- a/src/util/util.ts
+++ b/src/util/util.ts
@@ -13,15 +13,6 @@ export function unique<T>(xs: T[]) {
     return [...new Set(xs)];
 }
 
-export async function someAsync<T>(arr: ReadonlyArray<T>, f: (t: T) => Promise<boolean>): Promise<boolean> {
-    for (const x of arr) {
-        if (await f(x)) {
-            return true;
-        }
-    }
-    return false;
-}
-
 export function findLast<T, U extends T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => item is U): U | undefined;
 export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean): T | undefined;
 export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean) {


Test patch:
diff --git a/src/_tests/fixtures/43960-post-close/derived.json b/src/_tests/fixtures/43960-post-close/derived.json
index 4763775..eee3c8f 100644
--- a/src/_tests/fixtures/43960-post-close/derived.json
+++ b/src/_tests/fixtures/43960-post-close/derived.json
@@ -1,7 +1,6 @@
 {
   "type": "remove",
   "now": "2020-04-30T19:01:56.000Z",
-  "pr_number": 43960,
   "message": "PR is not active",
   "isDraft": false
 }
diff --git a/src/_tests/fixtures/44105/derived.json b/src/_tests/fixtures/44105/derived.json
index 0fe0f68..decb965 100644
--- a/src/_tests/fixtures/44105/derived.json
+++ b/src/_tests/fixtures/44105/derived.json
@@ -1,7 +1,5 @@
 {
   "type": "remove",
   "now": "2020-04-28T22:49:39.000Z",
-  "pr_number": 44105,
-  "message": "PR is not active",
-  "isDraft": false
+  "message": "PR is not active"
 }
diff --git a/src/_tests/fixtures/44256/derived.json b/src/_tests/fixtures/44256/derived.json
index 562305a..d751a9e 100644
--- a/src/_tests/fixtures/44256/derived.json
+++ b/src/_tests/fixtures/44256/derived.json
@@ -1,7 +1,6 @@
 {
   "type": "remove",
   "now": "2020-04-30T19:07:55.000Z",
-  "pr_number": 44256,
   "message": "PR is not active",
   "isDraft": false
 }
diff --git a/src/_tests/fixtures/44290/derived.json b/src/_tests/fixtures/44290/derived.json
index cbf0317..c42988c 100644
--- a/src/_tests/fixtures/44290/derived.json
+++ b/src/_tests/fixtures/44290/derived.json
@@ -1,7 +1,6 @@
 {
   "type": "remove",
   "now": "2020-04-28T16:41:44.000Z",
-  "pr_number": 44290,
   "message": "PR is a draft",
   "isDraft": true
 }
diff --git a/src/_tests/fixtures/45982/derived.json b/src/_tests/fixtures/45982/derived.json
index 8a17a85..77108b8 100644
--- a/src/_tests/fixtures/45982/derived.json
+++ b/src/_tests/fixtures/45982/derived.json
@@ -2,6 +2,5 @@
   "type": "error",
   "now": "2020-07-11T20:41:49.000Z",
   "message": "error parsing owners: At 1:1 : Expected /\\/\\/ Type definitions for (non-npm package )?/",
-  "pr_number": 45982,
   "author": "dasa"
 }