fe webhook for linear #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Notify on pull request events | |
on: | |
pull_request: | |
types: [opened, reopened] | |
pull_request_review_comment: | |
types: [created] | |
issue_comment: | |
types: [created] | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
steps: | |
# Notify when any PR is created | |
- name: Send Discord Notification for PRs | |
if: github.event_name == 'pull_request' | |
run: | | |
curl -H "Content-Type: application/json" \ | |
-d "{\"content\": \"🔄 New pull request by **${{ github.event.pull_request.user.login }}**\n${{ github.event.pull_request.html_url }}\n> ${{ github.event.pull_request.title }}\"}" \ | |
${{ secrets.DISCORD_WEBHOOK_PR }} | |
# Notify for PR review comments with mentions | |
- name: Send Discord Notification for PR Review Comments | |
if: | | |
github.event_name == 'pull_request_review_comment' && | |
github.event.comment.user.login != 'github-actions[bot]' && | |
github.event.comment.user.login != 'linear[bot]' && | |
contains(github.event.comment.body, '@') | |
run: | | |
curl -H "Content-Type: application/json" \ | |
-d "{\"content\": \"💬 New mention in PR review comment\n${{ github.event.comment.html_url }}\nBy **${{ github.event.comment.user.login }}**: ${{ github.event.comment.body }}\"}" \ | |
${{ secrets.DISCORD_WEBHOOK_PR }} | |
# Notify for PR comments with mentions | |
- name: Send Discord Notification for PR Comments | |
if: | | |
github.event_name == 'issue_comment' && | |
github.event.issue.pull_request && | |
github.event.comment.user.login != 'github-actions[bot]' && | |
github.event.comment.user.login != 'linear[bot]' && | |
contains(github.event.comment.body, '@') | |
run: | | |
curl -H "Content-Type: application/json" \ | |
-d "{\"content\": \"💬 New mention in PR comment\n${{ github.event.comment.html_url }}\nBy **${{ github.event.comment.user.login }}**: ${{ github.event.comment.body }}\"}" \ | |
${{ secrets.DISCORD_WEBHOOK_PR }} |