cbrgm / telegram-github-action

Send (text) messages to a Telegram chat from GitHub Actions
https://cbrgm.net
Apache License 2.0
6 stars 1 forks source link

Can't send messages if chat id is a negative number #32

Open lurppa opened 4 months ago

lurppa commented 4 months ago

Action fails and prints error: missing value for --to if chat id contains a minus sign at the beginning.

cbrgm commented 4 months ago

Oh is this even possible that chat id's can be negative numbers?

cbrgm commented 4 months ago

Can you provide an example worklow? Have you tried to set the negative number using '? Example: to: '-123'?

lurppa commented 4 months ago

Apparently all group chat id's are negative https://github.com/TelegramBots/Telegram.Bot/issues/661 .

Here's a link to the action in question: https://github.com/Linkkijkl/linkki-web/blob/main/.github/workflows/telegram_notify.yml .

to: ${{ secrets.TELEGRAM_CHAT_ID }}

I have already tried double quoting the secrets value but it got rejected by Telegram with 400 bad request, the same rejection what it replies with an unknown chat id.

I'll investigate more once I get back on my laptop. Thank you for your swift reply :)

github-actions[bot] commented 1 month ago

This issue is idle because it has been open for 14 days with no activity.