Add custom url (#44)

* add custom_html_url parameter

* Update action.yml

* Update README.md

* Update test.yml

* fix: fixed embedMsg url property

---------

Co-authored-by: SethCohen <47002293+SethCohen@users.noreply.github.com>
This commit is contained in:
meatvegsandwich
2025-06-17 00:28:13 -04:00
committed by GitHub
co-authored by SethCohen
parent 74ded4247d
commit 9fe781fdc7
4 changed files with 10 additions and 1 deletions
+1
View File
@@ -15,6 +15,7 @@ jobs:
color: ${{ inputs.COLOR }}
username: ${{ inputs.USERNAME }}
avatar_url: ${{ inputs.AVATAR_URL }}
custom_html_url: ${{ inputs.CUSTOM_HTML_URL }}
content: ${{ inputs.CONTENT }}
footer_title: ${{ inputs.FOOTER_TITLE }}
footer_icon_url: ${{ inputs.FOOTER_ICON_URL }}
+2
View File
@@ -38,6 +38,7 @@ A GitHub Action that sends a stylized Discord webhook containing the description
| color | ❌ | "2105893" | Decimal color value for embed. |
| username | ❌ | | String username for webhook. |
| avatar_url | ❌ | | String url to webhook avatar picture. |
| custom_html_url | ❌ | | Replace github release url with custom url |
| content | ❌ | | String content for webhook. |
| footer_title | ❌ | | String title for the webhook footer. |
| footer_icon_url | ❌ | | String url for the webhook footer picture. |
@@ -68,6 +69,7 @@ jobs:
color: "2105893"
username: "Release Changelog"
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
custom_html_url: "www.google.com"
content: "||@everyone||"
footer_title: "Changelog"
footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
+4 -1
View File
@@ -15,6 +15,9 @@ inputs:
avatar_url:
description: String url to webhook avatar picture.
required: false
custom_html_url:
description: If filled, replaces github's release url with your custom html url.
required: false
content:
description: String content for webhook.
required: false
@@ -44,4 +47,4 @@ runs:
main: 'index.js'
branding:
icon: file-text
color: blue
color: blue
+3
View File
@@ -185,6 +185,9 @@ const buildEmbedMessage = (name, html_url, description) => {
footer: {}
};
if (core.getInput('custom_html_url')) {
embedMsg.url = core.getInput('custom_html_url');
}
if (core.getInput('footer_title')) {
embedMsg.footer.text = limitString(core.getInput('footer_title'), 2048);
}