0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

Fix release announcement script (redemption arc) (#9835)

This commit is contained in:
Nate Moore 2024-01-26 09:16:27 -06:00 committed by GitHub
parent 8281ebddaa
commit 7ed24b90d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,7 @@ async function generateMessage() {
}
if (message.length < 2000) {
console.log(message);
return message;
} else {
const { name, version, url } = packages.find((pkg) => pkg.name === 'astro') ?? packages[0];
message = `${emoji} Some ${descriptor} ${pluralize(verb)}\n\n`;
@ -158,11 +158,8 @@ async function generateMessage() {
}
async function run() {
if (!process.env.DISCORD_WEBHOOK) {
console.error('No DISCORD_WEBHOOK variable detected!');
process.exit(1);
}
const content = await generateMessage();
console.log(content);
setOutput('DISCORD_MESSAGE', content);
}