mirror of
https://github.com/groldsf/obsidian_check_plugin.git
synced 2026-07-22 05:37:48 +00:00
101
This commit is contained in:
parent
d311b7aeed
commit
9eb37b1dc8
1 changed files with 4 additions and 3 deletions
7
.github/workflows/tg_notify.yml
vendored
7
.github/workflows/tg_notify.yml
vendored
|
|
@ -24,10 +24,11 @@ jobs:
|
|||
ACTION="${{ github.event.action }}"
|
||||
TITLE="${{ github.event.issue.title || github.event.pull_request.title || 'Комментарий' }}"
|
||||
URL="${{ github.event.issue.html_url || github.event.pull_request.html_url || github.event.comment.html_url || github.event.review.html_url }}"
|
||||
SAFE_TITLE=$(echo "$TITLE" | sed 's/`/\\`/g' | sed 's/(/\\(/g' | sed 's/)/\\)/g')
|
||||
TEXT="*Событие в ${REPO}*\nТип: \`${EVENT_TYPE}\`\nДействие: \`${ACTION}\`\nЗаголовок: \`${SAFE_TITLE}\`\n[Открыть](${URL})"
|
||||
SAFE_TITLE=$(echo "$TITLE" | sed 's/[`_*[\]()~#+-=|{}.!]/\\&/g')
|
||||
SAFE_REPO=$(echo "$REPO" | sed 's/[`_*[\]()~#+-=|{}.!]/\\&/g')
|
||||
TEXT="*Событие в ${SAFE_REPO}*\nТип: \`${EVENT_TYPE}\`\nДействие: \`${ACTION}\`\nЗаголовок: \`${SAFE_TITLE}\`\n[Открыть](${URL})"
|
||||
curl -s -X POST \
|
||||
https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage \
|
||||
-d chat_id=${TELEGRAM_CHAT_ID} \
|
||||
-d parse_mode=Markdown \
|
||||
-d parse_mode=MarkdownV2 \
|
||||
-d "text=${TEXT}"
|
||||
Loading…
Reference in a new issue