-
Notifications
You must be signed in to change notification settings - Fork 124
33 lines (31 loc) · 1.29 KB
/
pulls.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Dozer Pulls
on:
pull_request_target:
branches: [main, pull-yaml-dev]
types: [opened]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created, deleted]
concurrency:
group: pull
jobs:
notify:
name: Discord Pull
runs-on: ubuntu-latest
steps:
- name: Pull Request
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_GITHUB_WEBOOK }}
DISCORD_EMBEDS: '[ {
"title": " Pull request #${{ github.event.pull_request.number }} opened by ${{ github.actor }}",
"author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "https://github.com/${{ github.actor }}" },
"fields": [
{ "name": "Pull Request", "value": "[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})" },
{ "name": "Repository", "value": "[getdozer/dozer](https://github.com/getdozer/dozer)" },
{ "name": "Message", "value": ${{ toJSON(github.event.pull_request.body || github.event.pull_request.title) }}}
],
"color": 990099
}]'
uses: Ilshidur/action-discord@master