mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
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:
co-authored by
SethCohen
parent
74ded4247d
commit
9fe781fdc7
@@ -15,6 +15,7 @@ jobs:
|
|||||||
color: ${{ inputs.COLOR }}
|
color: ${{ inputs.COLOR }}
|
||||||
username: ${{ inputs.USERNAME }}
|
username: ${{ inputs.USERNAME }}
|
||||||
avatar_url: ${{ inputs.AVATAR_URL }}
|
avatar_url: ${{ inputs.AVATAR_URL }}
|
||||||
|
custom_html_url: ${{ inputs.CUSTOM_HTML_URL }}
|
||||||
content: ${{ inputs.CONTENT }}
|
content: ${{ inputs.CONTENT }}
|
||||||
footer_title: ${{ inputs.FOOTER_TITLE }}
|
footer_title: ${{ inputs.FOOTER_TITLE }}
|
||||||
footer_icon_url: ${{ inputs.FOOTER_ICON_URL }}
|
footer_icon_url: ${{ inputs.FOOTER_ICON_URL }}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ A GitHub Action that sends a stylized Discord webhook containing the description
|
|||||||
| color | ❌ | "2105893" | Decimal color value for embed. |
|
| color | ❌ | "2105893" | Decimal color value for embed. |
|
||||||
| username | ❌ | | String username for webhook. |
|
| username | ❌ | | String username for webhook. |
|
||||||
| avatar_url | ❌ | | String url to webhook avatar picture. |
|
| avatar_url | ❌ | | String url to webhook avatar picture. |
|
||||||
|
| custom_html_url | ❌ | | Replace github release url with custom url |
|
||||||
| content | ❌ | | String content for webhook. |
|
| content | ❌ | | String content for webhook. |
|
||||||
| footer_title | ❌ | | String title for the webhook footer. |
|
| footer_title | ❌ | | String title for the webhook footer. |
|
||||||
| footer_icon_url | ❌ | | String url for the webhook footer picture. |
|
| footer_icon_url | ❌ | | String url for the webhook footer picture. |
|
||||||
@@ -68,6 +69,7 @@ jobs:
|
|||||||
color: "2105893"
|
color: "2105893"
|
||||||
username: "Release Changelog"
|
username: "Release Changelog"
|
||||||
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
avatar_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
||||||
|
custom_html_url: "www.google.com"
|
||||||
content: "||@everyone||"
|
content: "||@everyone||"
|
||||||
footer_title: "Changelog"
|
footer_title: "Changelog"
|
||||||
footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
footer_icon_url: "https://cdn.discordapp.com/avatars/487431320314576937/bd64361e4ba6313d561d54e78c9e7171.png"
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ inputs:
|
|||||||
avatar_url:
|
avatar_url:
|
||||||
description: String url to webhook avatar picture.
|
description: String url to webhook avatar picture.
|
||||||
required: false
|
required: false
|
||||||
|
custom_html_url:
|
||||||
|
description: If filled, replaces github's release url with your custom html url.
|
||||||
|
required: false
|
||||||
content:
|
content:
|
||||||
description: String content for webhook.
|
description: String content for webhook.
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -185,6 +185,9 @@ const buildEmbedMessage = (name, html_url, description) => {
|
|||||||
footer: {}
|
footer: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (core.getInput('custom_html_url')) {
|
||||||
|
embedMsg.url = core.getInput('custom_html_url');
|
||||||
|
}
|
||||||
if (core.getInput('footer_title')) {
|
if (core.getInput('footer_title')) {
|
||||||
embedMsg.footer.text = limitString(core.getInput('footer_title'), 2048);
|
embedMsg.footer.text = limitString(core.getInput('footer_title'), 2048);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user