From 9f49b0c9ab5de966ccc4af94863fbddd73bac884 Mon Sep 17 00:00:00 2001 From: SethCohen Date: Wed, 24 Aug 2022 00:05:19 -0400 Subject: [PATCH] feat: updated action description format --- index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 721c1df..d7d3f15 100644 --- a/index.js +++ b/index.js @@ -27,11 +27,21 @@ async function run () { const content = await getContext() + const description = content.body + .replace(/## (.*?)\n/g,function (substring) { + const newString = substring.slice(3) + return `**${newString}**\n` + }) + .replace(/### (.*?)\n/g,function (substring) { + const newString = substring.slice(4) + return `**__${newString}__**\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], }