Skip to content

Commit

Permalink
feat: updated action description format
Browse files Browse the repository at this point in the history
  • Loading branch information
SethCohen committed Aug 24, 2022
1 parent 1b74a36 commit 9f49b0c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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], }
Expand Down

0 comments on commit 9f49b0c

Please sign in to comment.