From 900824d15d682e82fa94781e049e9c107b130223 Mon Sep 17 00:00:00 2001 From: Antonio Salazar Cardozo Date: Fri, 16 Jun 2023 13:17:12 -0400 Subject: [PATCH 1/4] Drop @here in fjord threads @heres aren't generally useful in threads due to inclusion rules. --- discord-scripts/fjord.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/discord-scripts/fjord.ts b/discord-scripts/fjord.ts index 777565e8..79469ef4 100644 --- a/discord-scripts/fjord.ts +++ b/discord-scripts/fjord.ts @@ -194,7 +194,6 @@ export default async function manageFjord(discordClient: Client, robot: Robot) { name: `Stale issues: ${repositoryOwner} ${repositoryName}`, autoArchiveDuration: 60, }) - await thread.send("@here") await thread.send(response.data) } }) @@ -249,7 +248,6 @@ export default async function manageFjord(discordClient: Client, robot: Robot) { name: `Issues: ${repositoryOwner} ${repositoryName}`, autoArchiveDuration: 60, }) - await thread.send("@here") await thread.send(response.data) } }) From 6e99c2c5923918c0de3420813902ddd6a3ab326e Mon Sep 17 00:00:00 2001 From: Antonio Salazar Cardozo Date: Fri, 16 Jun 2023 13:17:50 -0400 Subject: [PATCH 2/4] Drop @here in discord-webhook threads @heres aren't generally useful in threads due to inclusion rules. --- discord-scripts/discord-webhook.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/discord-scripts/discord-webhook.ts b/discord-scripts/discord-webhook.ts index 5d96c366..fe86a849 100644 --- a/discord-scripts/discord-webhook.ts +++ b/discord-scripts/discord-webhook.ts @@ -36,7 +36,6 @@ export default async function webhookDiscord( ) if (existingThread) { - await existingThread.send("@here") await existingThread.send(message) } else { const newThread = await channel.threads.create({ @@ -44,7 +43,6 @@ export default async function webhookDiscord( autoArchiveDuration: 60, reason: message, }) - await newThread.send("@here") if (tagUser !== "0") { await Promise.all( memberIds.map((id) => newThread.members.add(id.trim())), From 338aeb0d469f8e28e98d26747ca8f7f7ff2eaedc Mon Sep 17 00:00:00 2001 From: Antonio Salazar Cardozo Date: Fri, 16 Jun 2023 13:55:56 -0400 Subject: [PATCH 3/4] Use default autoArchiveDuration in threads created by discord-webhook --- discord-scripts/discord-webhook.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/discord-scripts/discord-webhook.ts b/discord-scripts/discord-webhook.ts index fe86a849..94ac622e 100644 --- a/discord-scripts/discord-webhook.ts +++ b/discord-scripts/discord-webhook.ts @@ -40,7 +40,6 @@ export default async function webhookDiscord( } else { const newThread = await channel.threads.create({ name: title, - autoArchiveDuration: 60, reason: message, }) if (tagUser !== "0") { From 16b6e6ddd9027964850d8ea97334b089e7662d54 Mon Sep 17 00:00:00 2001 From: Antonio Salazar Cardozo Date: Mon, 19 Jun 2023 08:35:36 -0400 Subject: [PATCH 4/4] Fix quite escape in env output build step The parameter determination task outputs the GitHub event JSON via a bash echo, but it was being done in single quotes. This meant PR descriptions with apostrophes or single quotes could break the escaping. Output is now in a heredoc block. --- .github/workflows/build-and-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e1e4cf64..f89d76e4 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -17,7 +17,9 @@ jobs: - name: Output environment run: | echo '${{ github.ref }}' - echo '${{ toJSON(github.event) }}' + echo <<-EOF + ${{ toJSON(github.event) }} + EOF outputs: # Run builds for all non-comment triggers. should-build: >-