Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Notify a Telegram channel.
| `telegram-chat-id` | `env_var_name` | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id |
| `parse_mode` | `string` | none | Use `Markdown` or `HTML`, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| `disable_notification` | `boolean` | none | Sends the message silently. Users will receive a notification with no sound. |

| `reply_to_message_id` | `integer` | reply to message from CircleCI | If the message is a reply, ID of the original message
Example:

```yaml
Expand All @@ -163,4 +163,3 @@ https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-cha

### How to setup CircleCI environment
In the settings page for your project on CircleCI, click `Environment Variables`. There you need to add 2 variables: `TELEGRAM_BOT_TOKEN` and `TELEGRAM_CHAT_ID`.

6 changes: 6 additions & 0 deletions src/jobs/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ parameters:
type: boolean
default: false

reply_to_message_id:
description: If the message is a reply, ID of the original message.
type: integer
default: TELEGRAM_CHAT_ID

executor: default

steps:
Expand All @@ -37,3 +42,4 @@ steps:
telegram-chat-id: << parameters.telegram-chat-id >>
parse_mode: << parameters.parse_mode >>
disable_notification: << parameters.disable_notification >>
reply_to_message_id: << parameters.reply_to_message_id >>