Sending formatted message
eelzinaty opened this issue · 4 comments
eelzinaty commented
First thanks for the great work you did, it helps a lot.
I want to ask if there is away to send a formatted message? i.e. markdown
Tried this example but it did not work for me
- name: New deployment started
uses: appleboy/telegram-action@master
with:
to: 11111
token: xxxxx
format: markdown
message: |+
**Service**
${{github.repository}}
** Owner **
${{github.actor}}
<b>Event</b>
${{github.event_name}}
_Ref_
${{github.ref}}
**SHA**
${{github.sha}}
**Message**
${{env.commitmsg}}
**Repo Action URL**
[Link](https://github.com/${{github.repository_owner}}/${{github.repository}}/actions/runs/${{github.run_id}})
rffontenelle commented
Here are the result of my tests. Hope it helps:
- bold: use single star sign
*bold*
- monospace: Use single backtick for inline monospace, and three-backticks for dedicated line monospace
args: "Text, and `inline monospace text` same line"
args: "Text, and ```dedicated line monospace``` separated lines"
- italic: no clue; fails with
_italic_
and__italic__
- new-line: good old
\n
new-line character - new message: a comma
,
, whereas\,
does not escape command and breaks the workflow
args: "one message, another message"
- hyperlink: good old
[text](link)
eelzinaty commented
Thanks Rafael, will test this out
…On Mon, 18 May 2020, 21:57 Rafael Fontenelle, ***@***.***> wrote:
Here are the result of my tests. Hope it helps:
- *bold:* use single star sign *bold*
- *monospace:* Use single backtick for inline monospace, and
three-backticks for dedicated line monospace
args: "Text, and `inline monospace text` same line
args: "Text, and ```dedicated line monospace``` separated lines"
- *italic:* no clue; fails with _italic_ and __italic__
- *new-line:* good old \n new-line character
- *new message:* a comma ,, whereas \, does not escape command and
breaks the workflow
args: "one message, another message"
- *hyperlink:* good old [text](link)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJD324KMAOD6X7KLHVOV5DRSGAKTANCNFSM4M4SYUCA>
.
rffontenelle commented
@eelzinaty If you manage to send your message, consider closing this issue. ;)
appleboy commented
Please refer to the markdown style link