Skip to content

Commit cd6facf

Browse files
committed
issue_tracker: Add workflow script to notify new issues in telegram
Change-Id: Idccad53707ab9b87cad974daa7fbf344b1773fe2 Signed-off-by: PrajjuS <theprajjus@gmail.com>
1 parent b9723eb commit cd6facf

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/issue_notify.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Issue Notifier
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
issue_tracker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@main
14+
15+
- name: Notify in Telegram
16+
run: |
17+
TgNotify() {
18+
curl -s -X POST "https://api.telegram.org/bot${{ secrets.BOT_TOKEN }}/sendMessage" -d chat_id="${{ secrets.PRIV_CHAT_ID }}" \
19+
-d parse_mode=Markdown \
20+
-d text="${1}" \
21+
-d disable_web_page_preview=true
22+
}
23+
24+
TgNotify "
25+
#ISSUE\_TRACKER
26+
*New Issue Opened at* [${{ github.repository }}](https://github.com/${{ github.repository }})
27+
*Title:* \`${{ github.event.issue.title }}\`
28+
*User:* [${{ github.actor }}](https://github.com/${{ github.actor }})
29+
*Issue URL:* [Here](${{ github.event.issue.html_url }})"

0 commit comments

Comments
 (0)