ci: Fix issue response script (#24891)

This PR fixes the issue response script.

There were a number of things preventing it from working:

- The directory name used in the GitHub Action did not match the one on
disk.
  - The script has been moved accordingly
- `ts-node` does not support ESM.
- `ts-node` seems unmaintained, so I changed the script to be plain JS
that is type-checked with TypeScript.
- The data being sent to the Slack API was invalid:
- Each section block can only have a maximum of 3000 characters in the
`text` field, so we need to break up the issue list across multiple
sections.
- We needed to escape `&`, `<`, and `>` characters in the issue titles.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-02-14 14:37:33 -05:00 committed by GitHub
parent de020af6ef
commit fc85ca0101
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 241 additions and 293 deletions

View file

@ -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 start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_ISSUE_RESPONSE_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_RESPONSE_WEBHOOK_URL }}