From a1d7a74af90fcf8c00d341c8c665ca796b18c689 Mon Sep 17 00:00:00 2001 From: SethCohen Date: Tue, 23 Aug 2022 23:30:39 -0400 Subject: [PATCH] feat: updated description format --- index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 721c1df..a45a8d1 100644 --- a/index.js +++ b/index.js @@ -27,11 +27,24 @@ async function run () { const content = await getContext() + let description = ''; + for (const line of content.body) { + if (line.startsWith('## ')) { + description += `**${line.slice(3)}**\n`; + } + else if (line.startsWith('### ')) { + description += `**__${line.slice(4)}__**\n`; + } + else if (line.startsWith('* ')) { + description += `- ${line.slice(2)}\n`; + } + } + const embedMsg = { title: `Release ${content.version}`, url: content.html_url, color: colour, - description: content.body, + description: description, } const body = { username: username, avatar_url: avatarUrl, embeds: [embedMsg], }