-
Notifications
You must be signed in to change notification settings - Fork 88
41 lines (37 loc) · 1.36 KB
/
notify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: PR merge/close notification
on:
pull_request:
types: [ closed ]
jobs:
merge_job:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: "${{ github.event.repository.name }}:
the ${{ github.event_name }} '${{ github.event.pull_request.title }}'
(#${{ github.event.number }}) was merged.
\n[Link](${{ github.event.pull_request.html_url }}).
\nDescription:\n${{ github.event.pull_request.body }}
\n
\nCheck it out to keep your local repository updated."
format: markdown
disable_web_page_preview: true
close_job:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: send custom message with args
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.CHAT_ID }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: "${{ github.event.repository.name }}:
the ${{ github.event_name }} ${{ github.event.pull_request.title }}
(${{ github.event.number }}) was closed."