-
-
Notifications
You must be signed in to change notification settings - Fork 403
117 lines (115 loc) · 4.25 KB
/
notify_chats.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: "Push Notification"
on:
create:
discussion:
gollum:
issue_comment:
project_card:
pull_request_target:
# pull_request:
types: [opened, reopened, synchronize, edited, ready_for_review, review_requested]
pull_request_review:
pull_request_review_comment:
types: [created, edited]
push:
branches:
- master
release:
jobs:
notify-matrix:
runs-on: ubuntu-latest
env:
ROOM_ID: "!yAWZbZcjAWXdqpjYQK:matrix.org"
steps:
- name: Matrix Push
if: github.event_name == 'push'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} pushed ${{ github.event.ref }} ${{ github.event.compare }}
${{ join(github.event.commits.*.message) }}
- name: Matrix Pull Request
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} altered ${{ github.event.pull_request.url }} (state=${{ github.event.pull_request.state }})
- name: Matrix Add tag
if: github.event_name == 'create' && github.event.ref_type == 'tag'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }}
- name: Matrix Discussions
if: github.event_name == 'discussions'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} changed the discussion in ${{ github.event.html_url }}.
- name: Matrix Wiki
if: github.event_name == 'gollum'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} changed the wiki
- name: Matrix Issue commented
if: github.event_name == 'issue_comment'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} commented on the issue ${{ github.event.comment.html_url }}
- name: Matrix Project Card
if: github.event_name == 'project_card'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} changed the project card ${{ github.event.project_card.url }}
- name: Matrix PR review
if: github.event_name == 'pull_request_review'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} reviewed PR ${{ github.event.review.html_url }}
- name: Matrix PR review comment
if: github.event_name == 'pull_request_review_comment'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} added a comment to review in PR ${{ github.event.comment.html_url }}
${{ github.event.comment.body }}
- name: Matrix Release
if: github.event_name == 'pull_request_review'
uses: s3krit/[email protected]
with:
room_id: ${{ env.ROOM_ID }}
server: "matrix.org"
access_token: ${{ secrets.MATRIX_API}}
message: |
${{ github.actor }} created a new release ${{ github.event.release.html_url }}