Skip to content

PR Notification

PR Notification #117

Workflow file for this run

name: PR Notification
on:
issue_comment:
types: [created]
pull_request:
types: [opened]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]
jobs:
approved:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: PR approved
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.pull_request.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
opened:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: New PR opened
message: |
**${{ github.event.pull_request.title }}**
**Creator:** ${{ github.event.pull_request.user.login }}
${{ github.event.pull_request.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
review_commented:
if: github.event_name == 'pull_request_review_comment'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: Review Commented
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.comment.body }}
${{ github.event.comment.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
pr_commented:
name: PR comment
if: |
github.event.issue.pull_request
&& github.actor != 'vercel[bot]'
&& github.event.action != 'opened'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: PR Commented
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.comment.body }}
${{ github.event.comment.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier