Skip to content

Commit

Permalink
chore: support disable web page preview
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Oct 3, 2020
1 parent 0e7bbc5 commit 154b7ba
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,20 @@ jobs:
message: |
⚡️ <a href="https://github.com/aszenz/repo/commit/${{ github.event.push.after }}">Commits</a> pushed to master by <em>${{ github.event.push.pusher.name }}</em> ⚡️
${{ github.actor }}:${{ github.event.head_commit.message }}
- name: link preview
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
link preview https://google.com.tw
- name: disable link preview
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
webpage_preview: false
message: |
link preview https://google.com.tw
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Remove `args` to send the default message.
* format - optional. `markdown` or `html`. See [MarkdownV2 style](https://core.telegram.org/bots/api#markdownv2-style)
* message - optional. custom message
* message_file - optional. overwrite the default message template with the contents of the specified file.
* webpage_preview - optional. disables link previews for links in this message. default is `true`.

## Example

Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
description: 'enable debug mode.'
format:
description: 'message format: markdown or html'
webpage_preview:
description: 'disables link previews for links in this message'
default: true
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down

0 comments on commit 154b7ba

Please sign in to comment.