-
Notifications
You must be signed in to change notification settings - Fork 9
34 lines (31 loc) · 1.75 KB
/
mm-pr-notify.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
34
---
name: Send notification to Mattermost
on:
pull_request:
types:
- opened
- reopened
- edited
- ready_for_review
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: mattermost/action-mattermost-notify@master
if: ${{ !github.event.pull_request.draft && !startsWith(github.event.pull_request.title, 'WIP:') && github.event.action != 'edited' && github.event.action != 'ready_for_review'}}
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
MATTERMOST_USERNAME: Github
MATTERMOST_ICON_URL: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/GitHub_Invertocat_Logo.svg/256px-GitHub_Invertocat_Logo.svg.png
TEXT: |
Создан Pull Request [${{ github.event.pull_request.title }}](${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }})
Автор: ${{ github.triggering_actor }}
- uses: mattermost/action-mattermost-notify@master
if: ${{ (github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'WIP:') == false && github.event.action == 'edited' && startsWith(github.event.changes.title.from, 'WIP:') == true ) || github.event.action == 'ready_for_review'}}
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_WH_PR }}
MATTERMOST_USERNAME: Github
MATTERMOST_ICON_URL: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/GitHub_Invertocat_Logo.svg/256px-GitHub_Invertocat_Logo.svg.png
TEXT: |
Pull Request готов к проверке [${{ github.event.pull_request.title }}](${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.number }})
Автор: ${{ github.triggering_actor }}