Files

27 lines
1.1 KiB
YAML

name: Discord Review Notify
on:
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]
issue_comment:
types: [created]
jobs:
notify:
if: |
github.event_name == 'pull_request_review' ||
github.event_name == 'pull_request_review_comment' ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request)
runs-on: ubuntu-latest
steps:
- name: Notify Discord for PR review events
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_OPENAPI_REVIEW }}
DISCORD_USERNAME: github-review-bot
DISCORD_AVATAR: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
DISCORD_EMBEDS: >
[{"title":"${{ github.repository }} · Review Update","description":"**Event**: `${{ github.event_name }}`\n**Actor**: `${{ github.actor }}`\n**PR**: #${{ github.event.pull_request.number || github.event.issue.number }}\n[Open PR](${{ github.event.pull_request.html_url || github.event.issue.html_url }})"}]