Skip to content

Commit

Permalink
ci: telegram bot (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
verytactical authored Nov 15, 2024
1 parent 21808e4 commit 75637cb
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Comment
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
build:
name: Telegram
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request }}
steps:
- name: Send telegram message on push
uses: appleboy/[email protected]
with:
to: ${{ secrets.TELEGRAM_ISSUE_CHAT_ID }}
token: ${{ secrets.TELEGRAM_ISSUE_TOKEN }}
format: Markdown
# this might go wrong, because `title` and `body` can have arbitrary markdown
message: |
✏️ [${{ github.event.comment.user.login }}](${{ github.event.comment.html_url }}): ${{ github.event.comment.body }}
🔀 ${{ github.event.issue.title }}
22 changes: 22 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pull request
on:
pull_request:
types: [opened, reopened]

jobs:
build:
name: Telegram
runs-on: ubuntu-latest
steps:
- name: Send telegram message on push
uses: appleboy/[email protected]
with:
to: ${{ secrets.TELEGRAM_ISSUE_CHAT_ID }}
token: ${{ secrets.TELEGRAM_ISSUE_TOKEN }}
format: Markdown
# this might go wrong, because `title` can have arbitrary markdown
message: |
🍰 [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
🌲 ${{ github.repository }}
👤 ${{ github.actor }}
🔀 ${{ github.event.pull_request.base.label }} <- ${{ github.event.pull_request.head.label }}

0 comments on commit 75637cb

Please sign in to comment.