From 5f6d04975116e566abed2a29fe4e4cd90b76d86d Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Wed, 19 Feb 2025 12:48:22 -0500 Subject: [PATCH] Include link to GitHub issues in issue response (#25178) Release Notes: - N/A --- script/issue_response/main.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/script/issue_response/main.js b/script/issue_response/main.js index 783eea5187..91319902fc 100644 --- a/script/issue_response/main.js +++ b/script/issue_response/main.js @@ -7,6 +7,7 @@ import { IncomingWebhook } from "@slack/webhook"; * [Slack Docs](https://api.slack.com/reference/block-kit/blocks#section) */ const SECTION_BLOCK_TEXT_LIMIT = 3000; +const GITHUB_ISSUES_URL = "https://github.com/zed-industries/zed/issues"; async function main() { const octokit = new Octokit({ @@ -42,8 +43,10 @@ async function main() { ...authorFilters, ]; + const searchQuery = q.join("+"); + const response = await octokit.rest.search.issuesAndPullRequests({ - q: q.join("+"), + q: searchQuery, per_page: 100, }); @@ -93,6 +96,16 @@ async function main() { }, })); + const issuesUrl = `${GITHUB_ISSUES_URL}?q=${encodeURIComponent(searchQuery)}`; + + blocks.push({ + type: "section", + text: { + type: "mrkdwn", + text: `<${issuesUrl}|View on GitHub>`, + }, + }); + await webhook.send({ blocks }); }