aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-10-06 20:34:38 +0200
committerDario Nieuwenhuis <[email protected]>2021-10-06 20:34:38 +0200
commita816776cb5cd641b152d39ac69f50bf21b86b04d (patch)
treedbd9f9fcf299db37fb325014f01cc2410683a49c
parentd9e2d176256ef4959c1ba60893ea361363d480d3 (diff)
Add matrix bot
-rw-r--r--.github/workflows/matrix-bot.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/matrix-bot.yml b/.github/workflows/matrix-bot.yml
new file mode 100644
index 000000000..3e2a865be
--- /dev/null
+++ b/.github/workflows/matrix-bot.yml
@@ -0,0 +1,44 @@
1name: Matrix bot
2on:
3 pull_request_target:
4 types: [opened, closed]
5
6jobs:
7 new-pr:
8 if: github.event.action == 'opened' && github.repository == 'embassy-rs/embassy'
9 runs-on: ubuntu-latest
10 continue-on-error: true
11 steps:
12 - name: send message
13 uses: s3krit/[email protected]
14 with:
15 room_id: ${{ secrets.MATRIX_ROOM_ID }}
16 access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
17 message: "New PR: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
18 server: "matrix.org"
19
20 merged-pr:
21 if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'embassy-rs/embassy'
22 runs-on: ubuntu-latest
23 continue-on-error: true
24 steps:
25 - name: send message
26 uses: s3krit/[email protected]
27 with:
28 room_id: ${{ secrets.MATRIX_ROOM_ID }}
29 access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
30 message: "PR merged: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
31 server: "matrix.org"
32
33 abandoned-pr:
34 if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'embassy-rs/embassy'
35 runs-on: ubuntu-latest
36 continue-on-error: true
37 steps:
38 - name: send message
39 uses: s3krit/[email protected]
40 with:
41 room_id: ${{ secrets.MATRIX_ROOM_ID }}
42 access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
43 message: "PR closed without merging: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
44 server: "matrix.org"