Skip to content

Commit d16a79f

Browse files
committed
Await release webhook
Signed-off-by: Joshua Castle <[email protected]>
1 parent 65d06f8 commit d16a79f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "base-release-action",
3-
"version": "1.5.1",
3+
"version": "1.5.2",
44
"description": "An action to create incremented releases in a similar style to Jenkins",
55
"repository": "https://github.com/Kas-tle/base-release-action.git",
66
"author": "Joshua Castle <[email protected]>",

src/action/hook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function sendWebhook(inp: {inputs: Inputs, api: OctokitApi, repoDat
4848
.setColor(color)
4949
.setTitle(inputs.release.name)
5050
.setUrl(updatedRelease.data.html_url)
51-
.setDescription(inputs.release.body)
51+
.setDescription(inputs.release.body.substring(0, 4000))
5252
.addField({ name: 'Assets', value: assets, inline: false })
5353
.addField({ name: '', value: `:watch: <t:${time}:R>`, inline: true })
5454
.addField({ name: '', value: `:label: [${tag}](${url}/${owner}/${repo}/tree/${tag})`, inline: true })
@@ -61,7 +61,7 @@ export async function sendWebhook(inp: {inputs: Inputs, api: OctokitApi, repoDat
6161
}
6262

6363
try {
64-
new Webhook(inputs.release.hook)
64+
await new Webhook(inputs.release.hook)
6565
.setUsername('GitHub Release Action')
6666
.setAvatarUrl('https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png')
6767
.addEmbed(embed)

0 commit comments

Comments
 (0)