mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41e4a2f6dc | ||
|
|
50fb8302d6 | ||
|
|
222db8282a | ||
|
|
a1d7a74af9 | ||
|
|
79005b23fe |
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.3.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.2.0...v1.3.0) (2022-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* changed default action colour ([79005b2](https://github.com/SethCohen/github-release-to-discord/commit/79005b23fefce850957d37ba17ebb796dc81f6a1))
|
||||||
|
* updated description format ([a1d7a74](https://github.com/SethCohen/github-release-to-discord/commit/a1d7a74af90fcf8c00d341c8c665ca796b18c689))
|
||||||
|
|
||||||
## [1.2.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.1.0...v1.2.0) (2022-08-24)
|
## [1.2.0](https://github.com/SethCohen/github-release-to-discord/compare/v1.1.0...v1.2.0) (2022-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ inputs:
|
|||||||
colour:
|
colour:
|
||||||
description: Decimal colour value for embed.
|
description: Decimal colour value for embed.
|
||||||
required: false
|
required: false
|
||||||
default: '0'
|
default: '202225'
|
||||||
username:
|
username:
|
||||||
description: String username for webhook.
|
description: String username for webhook.
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -27,11 +27,24 @@ async function run () {
|
|||||||
|
|
||||||
const content = await getContext()
|
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 = {
|
const embedMsg = {
|
||||||
title: `Release ${content.version}`,
|
title: `Release ${content.version}`,
|
||||||
url: content.html_url,
|
url: content.html_url,
|
||||||
color: colour,
|
color: colour,
|
||||||
description: content.body,
|
description: description,
|
||||||
}
|
}
|
||||||
|
|
||||||
const body = { username: username, avatar_url: avatarUrl, embeds: [embedMsg], }
|
const body = { username: username, avatar_url: avatarUrl, embeds: [embedMsg], }
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "github-release-to-discord",
|
"name": "github-release-to-discord",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "github-release-to-discord",
|
"name": "github-release-to-discord",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.9.1",
|
"@actions/core": "^1.9.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "github-release-to-discord",
|
"name": "github-release-to-discord",
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user