Skip to content

Commit

Permalink
fix: Telegram PR merge notification (#1348)
Browse files Browse the repository at this point in the history
* fix: change merge/close message

* fix: remove PR close notification
  • Loading branch information
DRMPN authored Nov 12, 2024
1 parent 949e7bf commit 1bd63c2
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: PR merge/close notification
name: Telegram PR merge notification
on:
pull_request:
types: [ closed ]
types: [closed]

jobs:

merge_job:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
Expand All @@ -15,27 +14,14 @@ jobs:
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
message: |
${{ github.event.repository.name }}: the PR [#${{ github.event.number }}](${{ github.event.pull_request.html_url }}) *"${{ github.event.pull_request.title }}"* was merged.
Description:
```markdown
${{ github.event.pull_request.body }}
```
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."
Check it out to keep your local repository updated!

0 comments on commit 1bd63c2

Please sign in to comment.