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], }