From 2a3088c310502a16d576b23f4b3f1ef755b0caa5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 04:17:34 +0000 Subject: [PATCH] Update action distribution files --- notify-discord/dist/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/notify-discord/dist/index.js b/notify-discord/dist/index.js index 17a3ca4..19fb31c 100644 --- a/notify-discord/dist/index.js +++ b/notify-discord/dist/index.js @@ -28013,15 +28013,17 @@ async function run() { const metadata = JSON.parse(fs.readFileSync(core.getInput('metadata'), 'utf8')); let downloads = ''; for (const label in metadata.downloads) { - downloads += `- [${metadata.downloads[label].name}](${downloadsApiUrl}/${metadata.project}/versions/${metadata.version}/builds/${metadata.number}/downloads/${label})\n`; + const url = new URL(`/${metadata.project}/versions/${metadata.version}/builds/${metadata.number}/downloads/${label}`, downloadsApiUrl).href; + downloads += `- [${metadata.downloads[label].name}](${url})\n`; } - embed.addField({ name: `Downloads (Build #${metadata.number})`, value: downloads, inline: false }); + embed.addField({ name: `Downloads`, value: downloads, inline: false }); + embed.addField({ name: '', value: `**Build #**: ${metadata.number}`, inline: true }); } embed - .addField({ name: '', value: `Released: `, inline: true }) - .addField({ name: '', value: `Status: ${core.getInput('status')}`, inline: true }) - .addField({ name: '', value: `Branch: [${branch}](${repoUrl}/tree/${branch})`, inline: true }) - .addField({ name: '', value: `Run ID: [${runId}](${repoUrl}/actions/runs/${runId})`, inline: true }); + .addField({ name: '', value: `**Released**: `, inline: true }) + .addField({ name: '', value: `**Status**: ${core.getInput('status')}`, inline: true }) + .addField({ name: '', value: `**Branch**: [${branch}](${repoUrl}/tree/${branch})`, inline: true }) + .addField({ name: '', value: `**Run ID**: [${runId}](${repoUrl}/actions/runs/${runId})`, inline: true }); try { new discord_webhook_1.Webhook(core.getInput('discordWebhook')) .setUsername('GitHub Actions')