Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Fix issue response script (#24891)
Marshall Bowersfc85ca0101e6
diff --git a/.github/workflows/issue_response.yml b/.github/workflows/issue_response.ymlindex a2162f55015..f45ee7c4cf4 100644--- a/.github/workflows/issue_response.yml+++ b/.github/workflows/issue_response.yml@@ -27,7 +27,7 @@ jobs:- run: pnpm install --dir script/issue_response- name: Run Issue Response- run: pnpm exec ts-node script/issue_response/main.ts+ run: pnpm run --dir script/issue_response startenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}diff --git a/script/issues_response/.gitignore b/script/issue_response/.gitignoresimilarity index 100%rename from script/issues_response/.gitignorerename to script/issue_response/.gitignorediff --git a/script/issue_response/main.js b/script/issue_response/main.jsnew file mode 100644index 00000000000..da6cc1eb341--- /dev/null+++ b/script/issue_response/main.js@@ -0,0 +1,99 @@+import { Octokit } from "@octokit/rest";+import { IncomingWebhook } from "@slack/webhook";++/**+ * The maximum length of the `text` in a section block.+ *+ * [Slack Docs](https://api.slack.com/reference/block-kit/blocks#section)+ */+const SECTION_BLOCK_TEXT_LIMIT = 3000;++async function main() {+ const octokit = new Octokit({ auth: process.env["GITHUB_TOKEN"] });++ if (!process.env["SLACK_ISSUE_RESPONSE_WEBHOOK_URL"]) {+ throw new Error("SLACK_ISSUE_RESPONSE_WEBHOOK_URL is not set");+ }++ const webhook = new IncomingWebhook(+ process.env["SLACK_ISSUE_RESPONSE_WEBHOOK_URL"],+ );++ const owner = "zed-industries";+ const repo = "zed";+ const staff = await octokit.paginate(octokit.rest.orgs.listMembers, {+ org: owner,+ per_page: 100,+ });+ let staffHandles = staff.map((member) => member.login);+ let commenterFilters = staffHandles.map((name) => `-commenter:${name}`);+ let authorFilters = staffHandles.map((name) => `-author:${name}`);++ const q = [+ `repo:${owner}/${repo}`,+ "is:issue",+ "state:open",+ "created:>=2025-02-01",+ "sort:created-asc",+ ...commenterFilters,+ ...authorFilters,+ ];++ const response = await octokit.rest.search.issuesAndPullRequests({+ q: q.join("+"),+ per_page: 100,+ });++ let issues = response.data.items;+ let issueLines = issues.map((issue, index) => {+ const formattedDate = new Date(issue.created_at).toLocaleDateString(+ "en-US",+ {+ year: "numeric",+ month: "short",+ day: "numeric",+ },+ );+ const sanitizedTitle = issue.title+ .replaceAll("&", "&")+ .replaceAll("<", "<")+ .replaceAll(">", ">");++ return `${index + 1}. ${formattedDate}: <${issue.html_url}|${sanitizedTitle}>\n`;+ });++ const sections = [];+ /** @type {string[]} */+ let currentSection = [];+ let currentSectionLength = 0;++ for (const issueLine of issueLines) {+ if (currentSectionLength + issueLine.length <= SECTION_BLOCK_TEXT_LIMIT) {+ currentSection.push(issueLine);+ currentSectionLength += issueLine.length;+ } else {+ sections.push(currentSection);+ currentSection = [];+ currentSectionLength = 0;+ }+ }++ if (currentSection.length > 0) {+ sections.push(currentSection);+ }++ const blocks = sections.map((section) => ({+ type: "section",+ text: {+ type: "mrkdwn",+ text: section.join("").trimEnd(),+ },+ }));++ await webhook.send({ blocks });+}++main().catch((error) => {+ console.error("An error occurred:", error);+ process.exit(1);+});diff --git a/script/issue_response/package.json b/script/issue_response/package.jsonnew file mode 100644index 00000000000..97a81366f70--- /dev/null+++ b/script/issue_response/package.json@@ -0,0 +1,24 @@+{+ "name": "issue_response",+ "version": "1.0.0",+ "private": true,+ "main": "main.js",+ "type": "module",+ "scripts": {+ "build": "tsc -p .",+ "start": "node main.js"+ },+ "dependencies": {+ "@octokit/rest": "^21.1.0",+ "@slack/webhook": "^7.0.4",+ "date-fns": "^4.1.0",+ "octokit": "^4.1.1"+ },+ "devDependencies": {+ "@octokit/types": "^13.8.0",+ "@slack/types": "^2.14.0",+ "@tsconfig/node20": "20.1.4",+ "@tsconfig/strictest": "2.0.5",+ "typescript": "5.7.3"+ }+}diff --git a/script/issues_response/pnpm-lock.yaml b/script/issue_response/pnpm-lock.yamlsimilarity index 55%rename from script/issues_response/pnpm-lock.yamlrename to script/issue_response/pnpm-lock.yamlindex 93061cdef1e..2ab8c05ab61 100644--- a/script/issues_response/pnpm-lock.yaml+++ b/script/issue_response/pnpm-lock.yaml@@ -18,8 +18,8 @@ importers:specifier: ^4.1.0version: 4.1.0octokit:- specifier: ^4.1.0- version: 4.1.0+ specifier: ^4.1.1+ version: 4.1.1devDependencies:'@octokit/types':specifier: ^13.8.0@@ -27,28 +27,20 @@ importers:'@slack/types':specifier: ^2.14.0version: 2.14.0- ts-node:- specifier: ^10.9.2- version: 10.9.2(@types/[email protected])([email protected])+ '@tsconfig/node20':+ specifier: 20.1.4+ version: 20.1.4+ '@tsconfig/strictest':+ specifier: 2.0.5+ version: 2.0.5+ typescript:+ specifier: 5.7.3+ version: 5.7.3packages:- '@cspotcode/[email protected]':- resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}- engines: {node: '>=12'}-- '@jridgewell/[email protected]':- resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}- engines: {node: '>=6.0.0'}-- '@jridgewell/[email protected]':- resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}-- '@jridgewell/[email protected]':- resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}-- '@octokit/[email protected]':- resolution: {integrity: sha512-6aKmKvqnJKoVK+kx0mLlBMKmQYoziPw4Rd/PWr0j65QVQlrDXlu6hGU8fmTXt7tNkf/DsubdIaTT4fkoWzCh5g==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-injaSv2CN8wZrhhnVky3HcQVEy4rRoIAm+OeCwNQzgQJn1OTglfT7RyMDaCbkiNWXDR0tkWLkWMv4duTTj765g==}engines: {node: '>= 18'}'@octokit/[email protected]':@@ -59,8 +51,8 @@ packages:resolution: {integrity: sha512-3woNZgq5/S6RS+9ZTq+JdymxVr7E0s4EYxF20ugQvgX3pomdPUL5r/XdTY9wALoBM2eHVy4ettr5fKpatyTyHw==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-gTOIzDeV36OhVfxCl69FmvJix7tJIiU6dlxuzLVAzle7fYfO8UDyddr9B+o4CFQVaMBLMGZ9ak2CWMYcGeZnPw==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-BECO/N4B/Uikj0w3GCvjf/odMujtYTP3q82BJSjxC2J3rxTEiZIJ+z2xnRlDb0IE9dQSaTgRqUPVOieSbFcVzg==}engines: {node: '>= 18'}'@octokit/[email protected]':@@ -75,12 +67,12 @@ packages:resolution: {integrity: sha512-bGXqdN6RhSFHvpPq46SL8sN+F3odQ6oMNLWc875IgoqcC3qus+fOL2th6Tkl94wvdSTy8/OeHzWy/lZebmnhog==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-z+j7DixNnfpdToYsOutStDgeRzJSMnbj8T1C/oQjB6Aa+kRfNjs/Fn7W6c8bmlt6mfy3FkgeKBRnDjxQow5dow==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-XybpFv9Ms4hX5OCHMZqyODYqGTZ3H6K6Vva+M9LR7ib/xr1y1ZnlChYv9H680y77Vd/i/k+thXApeRASBQkzhA==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==}engines: {node: '>= 18'}'@octokit/[email protected]':@@ -95,15 +87,15 @@ packages:resolution: {integrity: sha512-ooXV8GBSabSWyhLUowlMIVd9l1s2nsOGQdlP2SQ4LnkEsGXzeCvbSbCPdZThXhEFzleGPwbapT0Sb+YhXRyjCA==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-M+bDBi5H8FnH0xhCTg0m9hvcnppdDnxUqbZyOkxlLblKpLAR+eT2nbDPvJDp0eLrvJWA1I8OX0KHf/sBMQARRA==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-Jc/ycnePClOvO1WL7tlC+TRxOFtyJBGuTDsL4dzXNiVZvzZdrPuNw7zHI3qJSUX2n6RLXE5L0SkFmYyNaVUFoQ==}engines: {node: '>= 18'}'@octokit/[email protected]':resolution: {integrity: sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==}- '@octokit/[email protected]':- resolution: {integrity: sha512-i3h1b5zpGSB39ffBbYdSGuAd0NhBAwPyA3QV3LYi/lx4lsbZiu7u2UHgXVUR6EpvOI8REOuVh1DZTRfHoJDvuQ==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-bO1D2jLdU8qEvqmbWjNxJzDYSFT4wesiYKIKP6f4LaM0XUGtn/0LBv/20hu9YqcnpdX38X5o/xANTMtIAqdwYw==}'@octokit/[email protected]':resolution: {integrity: sha512-pLZES1jWaOynXKHOqdnwZ5ULeVR6tVVCMm+AUbp0htdcyXDU95WbkYdU4R2ej1wKj5Tu94Mee2Ne0PjPO9cCyA==}@@ -111,8 +103,8 @@ packages:peerDependencies:'@octokit/core': '>=6'- '@octokit/[email protected]':- resolution: {integrity: sha512-ttpGck5AYWkwMkMazNCZMqxKqIq1fJBNxBfsFwwfyYKTf914jKkLF0POMS3YkPBwp5g1c2Y4L79gDz01GhSr1g==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==}engines: {node: '>= 18'}peerDependencies:'@octokit/core': '>=6'@@ -123,8 +115,8 @@ packages:peerDependencies:'@octokit/core': '>=6'- '@octokit/[email protected]':- resolution: {integrity: sha512-LUm44shlmkp/6VC+qQgHl3W5vzUP99ZM54zH6BuqkJK4DqfFLhegANd+fM4YRLapTvPm4049iG7F3haANKMYvQ==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==}engines: {node: '>= 18'}peerDependencies:'@octokit/core': '>=6'@@ -141,12 +133,12 @@ packages:peerDependencies:'@octokit/core': ^6.1.3- '@octokit/[email protected]':- resolution: {integrity: sha512-pqnVKYo/at0NuOjinrgcQYpEbv4snvP3bKMRqHaD9kIsk9u1LCpb2smHZi8/qJfgeNqLo5hNW4Z7FezNdEo0xg==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-kXLfcxhC4ozCnAXy2ff+cSxpcF0A1UqxjvYMqNuPIeOAzJbVWQ+dy5G2fTylofB/gTbObT8O6JORab+5XtA1Kw==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-TqHLIdw1KFvx8WvLc7Jv94r3C3+AzKY2FWq7c20zvrxmCIa6MCVkLCE/826NCXnml3LFJjLsidDh1BhMaGEDQw==}engines: {node: '>= 18'}'@octokit/[email protected]':@@ -156,12 +148,12 @@ packages:'@octokit/[email protected]':resolution: {integrity: sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==}- '@octokit/[email protected]':- resolution: {integrity: sha512-yFZa3UH11VIxYnnoOYCVoJ3q4ChuSOk2IVBBQ0O3xtKX4x9bmKb/1t+Mxixv2iUhzMdOl1qeWJqEhouXXzB3rQ==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg==}engines: {node: '>= 18'}- '@octokit/[email protected]':- resolution: {integrity: sha512-uSO/TCCfi9vaZHOBsGWsRNBXYYKtLnSDbHI+std0M80AaEd7AnVfLqvk+9V3GP1faPcOx06ADx+h8UWwvemIGw==}+ '@octokit/[email protected]':+ resolution: {integrity: sha512-qoYP1g6ZP01m8LtKjC+NLuAqRbiVzS5VmnwoEYlrQr6TaLRtb5yAMxWCq5/AqfrUF2Wx6ZQ9IJ4mAFytEn7J9A==}engines: {node: '>= 18'}'@slack/[email protected]':@@ -172,35 +164,17 @@ packages:resolution: {integrity: sha512-JDJte2dbJCcq1/GCMBYJH6fj+YS4n5GuPjT4tF3O1NPN6pFPCR9yA/apRh9sdfhdFG7hadiRgmiQqC4GLgNkZg==}engines: {node: '>= 18', npm: '>= 8.6.0'}- '@tsconfig/[email protected]':- resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==}-- '@tsconfig/[email protected]':- resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==}-- '@tsconfig/[email protected]':- resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==}+ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==}- '@tsconfig/[email protected]':- resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==}+ '@tsconfig/[email protected]':+ resolution: {integrity: sha512-ec4tjL2Rr0pkZ5hww65c+EEPYwxOi4Ryv+0MtjeaSQRJyq322Q27eOQiFbuNgw2hpL4hB1/W/HBGk3VKS43osg==}'@types/[email protected]':resolution: {integrity: sha512-nD0Z9fNIZcxYX5Mai2CTmFD7wX7UldCkW2ezCF8D1T5hdiLsnTWDGRpfRYntU6VjTdLQjOvyszru7I1c1oCQew==}- '@types/[email protected]':- resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==}-- resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}- engines: {node: '>=0.4.0'}-- resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}- engines: {node: '>=0.4.0'}- hasBin: true-- resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}+ '@types/[email protected]':+ resolution: {integrity: sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==}resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==}@@ -218,9 +192,6 @@ packages:resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}engines: {node: '>= 0.8'}- resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}-resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==}@@ -228,10 +199,6 @@ packages:resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}engines: {node: '>=0.4.0'}- resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}- engines: {node: '>=0.3.1'}-resolution: {integrity: sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==}@@ -248,9 +215,6 @@ packages:resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==}engines: {node: '>= 6'}- resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}-resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}engines: {node: '>= 0.6'}@@ -259,8 +223,8 @@ packages:resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}engines: {node: '>= 0.6'}- resolution: {integrity: sha512-/UrQAOSvkc+lUUWKNzy4ByAgYU9KpFzZQt8DnC962YmQuDiZb1SNJ90YukCCK5aMzKqqCA+z1kkAlmzYvdYKag==}+ resolution: {integrity: sha512-GMjkrTnGk2PB9MKnK5SVDj4wSrnVX39vldKvYIC3MVNDQY1nZ6ufPrGCUFsQ645q5q+PG+CHUWRB6ZH8MBcyFg==}engines: {node: '>= 18'}@@ -270,20 +234,6 @@ packages:resolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==}engines: {node: '>=12'}- resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}- hasBin: true- peerDependencies:- '@swc/core': '>=1.2.50'- '@swc/wasm': '>=1.2.50'- '@types/node': '*'- typescript: '>=2.7'- peerDependenciesMeta:- '@swc/core':- optional: true- '@swc/wasm':- optional: true-resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}engines: {node: '>=14.17'}@@ -298,44 +248,24 @@ packages:resolution: {integrity: sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==}- resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}-- resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==}- engines: {node: '>=6'}-snapshots:- '@cspotcode/[email protected]':- dependencies:- '@jridgewell/trace-mapping': 0.3.9-- '@jridgewell/[email protected]': {}-- '@jridgewell/[email protected]': {}-- '@jridgewell/[email protected]':- dependencies:- '@jridgewell/resolve-uri': 3.1.2- '@jridgewell/sourcemap-codec': 1.5.0-- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:'@octokit/auth-app': 7.1.4'@octokit/auth-unauthenticated': 6.1.1- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4'@octokit/oauth-app': 7.1.5- '@octokit/plugin-paginate-rest': 11.4.0(@octokit/[email protected])+ '@octokit/plugin-paginate-rest': 11.4.2(@octokit/[email protected])'@octokit/types': 13.8.0- '@octokit/webhooks': 13.5.0+ '@octokit/webhooks': 13.6.0'@octokit/[email protected]':dependencies:'@octokit/auth-oauth-app': 8.1.2'@octokit/auth-oauth-user': 5.1.2- '@octokit/request': 9.2.0- '@octokit/request-error': 6.1.6+ '@octokit/request': 9.2.1+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0toad-cache: 3.7.0universal-github-app-jwt: 2.2.0@@ -343,24 +273,24 @@ snapshots:'@octokit/[email protected]':dependencies:- '@octokit/auth-oauth-device': 7.1.2+ '@octokit/auth-oauth-device': 7.1.3'@octokit/auth-oauth-user': 5.1.2- '@octokit/request': 9.2.0+ '@octokit/request': 9.2.1'@octokit/types': 13.8.0universal-user-agent: 7.0.2- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:- '@octokit/oauth-methods': 5.1.3- '@octokit/request': 9.2.0+ '@octokit/oauth-methods': 5.1.4+ '@octokit/request': 9.2.1'@octokit/types': 13.8.0universal-user-agent: 7.0.2'@octokit/[email protected]':dependencies:- '@octokit/auth-oauth-device': 7.1.2- '@octokit/oauth-methods': 5.1.3- '@octokit/request': 9.2.0+ '@octokit/auth-oauth-device': 7.1.3+ '@octokit/oauth-methods': 5.1.4+ '@octokit/request': 9.2.1'@octokit/types': 13.8.0universal-user-agent: 7.0.2@@ -368,27 +298,27 @@ snapshots:'@octokit/[email protected]':dependencies:- '@octokit/request-error': 6.1.6+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:'@octokit/auth-token': 5.1.2'@octokit/graphql': 8.2.0- '@octokit/request': 9.2.0- '@octokit/request-error': 6.1.6+ '@octokit/request': 9.2.1+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0before-after-hook: 3.0.2universal-user-agent: 7.0.2- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:'@octokit/types': 13.8.0universal-user-agent: 7.0.2'@octokit/[email protected]':dependencies:- '@octokit/request': 9.2.0+ '@octokit/request': 9.2.1'@octokit/types': 13.8.0universal-user-agent: 7.0.2@@ -397,119 +327,107 @@ snapshots:'@octokit/auth-oauth-app': 8.1.2'@octokit/auth-oauth-user': 5.1.2'@octokit/auth-unauthenticated': 6.1.1- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4'@octokit/oauth-authorization-url': 7.1.1- '@octokit/oauth-methods': 5.1.3+ '@octokit/oauth-methods': 5.1.4'@types/aws-lambda': 8.10.147universal-user-agent: 7.0.2'@octokit/[email protected]': {}- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:'@octokit/oauth-authorization-url': 7.1.1- '@octokit/request': 9.2.0- '@octokit/request-error': 6.1.6+ '@octokit/request': 9.2.1+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0'@octokit/[email protected]': {}- '@octokit/[email protected]': {}+ '@octokit/[email protected]': {}- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4'@octokit/types': 13.8.0- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4'@octokit/types': 13.8.0- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3- '@octokit/request-error': 6.1.6+ '@octokit/core': 6.1.4+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0bottleneck: 2.19.5- '@octokit/[email protected](@octokit/[email protected])':+ '@octokit/[email protected](@octokit/[email protected])':dependencies:- '@octokit/core': 6.1.3+ '@octokit/core': 6.1.4'@octokit/types': 13.8.0bottleneck: 2.19.5- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:'@octokit/types': 13.8.0- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:- '@octokit/endpoint': 10.1.2- '@octokit/request-error': 6.1.6+ '@octokit/endpoint': 10.1.3+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0fast-content-type-parse: 2.0.1universal-user-agent: 7.0.2'@octokit/[email protected]':dependencies:- '@octokit/core': 6.1.3- '@octokit/plugin-paginate-rest': 11.4.0(@octokit/[email protected])- '@octokit/plugin-request-log': 5.3.1(@octokit/[email protected])- '@octokit/plugin-rest-endpoint-methods': 13.3.0(@octokit/[email protected])+ '@octokit/core': 6.1.4+ '@octokit/plugin-paginate-rest': 11.4.2(@octokit/[email protected])+ '@octokit/plugin-request-log': 5.3.1(@octokit/[email protected])+ '@octokit/plugin-rest-endpoint-methods': 13.3.1(@octokit/[email protected])'@octokit/[email protected]':dependencies:'@octokit/openapi-types': 23.0.1- '@octokit/[email protected]': {}+ '@octokit/[email protected]': {}- '@octokit/[email protected]':+ '@octokit/[email protected]':dependencies:- '@octokit/openapi-webhooks-types': 8.5.1- '@octokit/request-error': 6.1.6- '@octokit/webhooks-methods': 5.1.0+ '@octokit/openapi-webhooks-types': 9.1.0+ '@octokit/request-error': 6.1.7+ '@octokit/webhooks-methods': 5.1.1'@slack/[email protected]': {}'@slack/[email protected]':dependencies:'@slack/types': 2.14.0- '@types/node': 22.13.1+ '@types/node': 22.13.4axios: 1.7.9transitivePeerDependencies:- debug- '@tsconfig/[email protected]': {}-- '@tsconfig/[email protected]': {}-- '@tsconfig/[email protected]': {}+ '@tsconfig/[email protected]': {}- '@tsconfig/[email protected]': {}+ '@tsconfig/[email protected]': {}'@types/[email protected]': {}- '@types/[email protected]':+ '@types/[email protected]':dependencies:undici-types: 6.20.0- dependencies:- acorn: 8.14.0-- [email protected]: {}-- [email protected]: {}-@@ -528,14 +446,10 @@ snapshots:dependencies:delayed-stream: 1.0.0- [email protected]: {}-- [email protected]: {}-@@ -546,49 +460,29 @@ snapshots:combined-stream: 1.0.8mime-types: 2.1.35- [email protected]: {}-dependencies:mime-db: 1.52.0dependencies:- '@octokit/app': 15.1.2- '@octokit/core': 6.1.3+ '@octokit/app': 15.1.3+ '@octokit/core': 6.1.4'@octokit/oauth-app': 7.1.5- '@octokit/plugin-paginate-graphql': 5.2.4(@octokit/[email protected])- '@octokit/plugin-paginate-rest': 11.4.0(@octokit/[email protected])- '@octokit/plugin-rest-endpoint-methods': 13.3.0(@octokit/[email protected])- '@octokit/plugin-retry': 7.1.3(@octokit/[email protected])- '@octokit/plugin-throttling': 9.4.0(@octokit/[email protected])- '@octokit/request-error': 6.1.6+ '@octokit/plugin-paginate-graphql': 5.2.4(@octokit/[email protected])+ '@octokit/plugin-paginate-rest': 11.4.2(@octokit/[email protected])+ '@octokit/plugin-rest-endpoint-methods': 13.3.1(@octokit/[email protected])+ '@octokit/plugin-retry': 7.1.3(@octokit/[email protected])+ '@octokit/plugin-throttling': 9.4.0(@octokit/[email protected])+ '@octokit/request-error': 6.1.7'@octokit/types': 13.8.0- dependencies:- '@cspotcode/source-map-support': 0.8.1- '@tsconfig/node10': 1.0.11- '@tsconfig/node12': 1.0.11- '@tsconfig/node14': 1.0.3- '@tsconfig/node16': 1.0.4- '@types/node': 22.13.1- acorn: 8.14.0- acorn-walk: 8.3.4- arg: 4.1.3- create-require: 1.1.1- diff: 4.0.2- make-error: 1.3.6- typescript: 5.7.3- v8-compile-cache-lib: 3.0.1- yn: 3.1.1-@@ -596,7 +490,3 @@ snapshots:-- [email protected]: {}-- [email protected]: {}diff --git a/script/issue_response/tsconfig.json b/script/issue_response/tsconfig.jsonnew file mode 100644index 00000000000..2011962a220--- /dev/null+++ b/script/issue_response/tsconfig.json@@ -0,0 +1,9 @@+{+ "$schema": "https://json.schemastore.org/tsconfig",+ "extends": ["@tsconfig/node20/tsconfig.json", "@tsconfig/strictest/tsconfig.json"],+ "compilerOptions": {+ "checkJs": true,+ "noEmit": true+ },+ "include": ["main.js"]+}diff --git a/script/issues_response/main.ts b/script/issues_response/main.tsdeleted file mode 100644index e295a1c28f9..00000000000--- a/script/issues_response/main.ts+++ /dev/null@@ -1,61 +0,0 @@-import { Octokit } from "@octokit/rest";-import { IncomingWebhook } from "@slack/webhook";--async function main() {- const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });- const webhook = new IncomingWebhook(- process.env.SLACK_ISSUE_RESPONSE_WEBHOOK_URL!,- );-- const owner = "zed-industries";- const repo = "zed";- const staff = await octokit.paginate(octokit.rest.orgs.listMembers, {- org: owner,- per_page: 100,- });- let staffHandles = staff.map((member) => member.login);- let commenterFilters = staffHandles.map((name) => `-commenter:${name}`);- let authorFilters = staffHandles.map((name) => `-author:${name}`);-- const q = [- `repo:${owner}/${repo}`,- "is:issue",- "state:open",- "created:>=2025-02-01",- "sort:created-asc",- ...commenterFilters,- ...authorFilters,- ];-- const response = await octokit.rest.search.issuesAndPullRequests({- q: q.join("+"),- per_page: 100,- });-- let issues = response.data.items;- let issueLines = issues.map((issue, index) => {- const formattedDate = new Date(issue.created_at).toLocaleDateString(- "en-US",- {- year: "numeric",- month: "short",- day: "numeric",- },- );- return `${index + 1}. ${formattedDate}: <${issue.html_url}|${issue.title}>`;- });-- const blocks = [- {- type: "section",- text: {- type: "mrkdwn",- text: issueLines.join("\n"),- },- },- ];-- await webhook.send({ blocks: blocks });-}--main().catch((error) => console.error("An error occurred:", error));diff --git a/script/issues_response/package.json b/script/issues_response/package.jsondeleted file mode 100644index 8ef675c42bc..00000000000--- a/script/issues_response/package.json+++ /dev/null@@ -1,13 +0,0 @@-{- "dependencies": {- "@octokit/rest": "^21.1.0",- "@slack/webhook": "^7.0.4",- "date-fns": "^4.1.0",- "octokit": "^4.1.0"- },- "devDependencies": {- "@octokit/types": "^13.8.0",- "@slack/types": "^2.14.0",- "ts-node": "^10.9.2"- }-}