2021-08-08 13:05:30 -05:00
|
|
|
name: "Discord:congratsbot"
|
2021-08-08 13:02:43 -05:00
|
|
|
|
|
|
|
# only trigger on pull request closed events
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [ closed ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
congrats:
|
2021-08-08 13:05:30 -05:00
|
|
|
name: "Discord:congratsbot"
|
2021-08-08 13:02:43 -05:00
|
|
|
# this job will only run if the PR has been merged
|
|
|
|
if: github.event.pull_request.merged == true
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Send a Discord notification if a PR was merged
|
|
|
|
env:
|
|
|
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_CONGRATS }}
|
2021-08-08 13:25:13 -05:00
|
|
|
# DISCORD_AVATAR: ${{ github.event.pull_request.user.avatar_url }}
|
2021-08-08 13:02:43 -05:00
|
|
|
uses: Ilshidur/action-discord@0.3.2
|
|
|
|
with:
|
2021-08-08 13:26:30 -05:00
|
|
|
args: '**Sweet!** [@${{ github.event.pull_request.user.login }}](<${{ github.event.pull_request.user.url }}>) just merged GitHub PR[#${{ github.event.number }}: ${{ github.event.pull_request.title }}](<${{github.event.pull_request.url}}>)'
|