diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-05-02 06:40:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-02 06:40:00 +0000 |
| commit | 06d2941d6fed34334d22768b44f6e285235c7daa (patch) | |
| tree | 72c845b558b677f4d980409b15b11dcbfbec2f8a | |
| parent | f24e9264b15aefdea269a5a2be3e6678a347e6b4 (diff) | |
| parent | 2e5e7698b6facc1a2de1d88ed4c2c8b300178da3 (diff) | |
Merge #636
636: Added matrix bot r=AfoHT a=korken89
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
| -rw-r--r-- | .github/workflows/matrix-bot.yml | 44 |
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 0000000..6ef6787 --- /dev/null +++ b/.github/workflows/matrix-bot.yml @@ -0,0 +1,44 @@ +name: Matrix bot +on: + pull_request_target: + types: [opened, closed] + +jobs: + new-pr: + if: github.event.action == 'opened' && github.repository == 'rtic-rs/cortex-m-rtic' + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: send message + uses: s3krit/matrix-message-action@v0.0.3 + with: + room_id: ${{ secrets.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} + message: "New PR: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})" + server: "matrix.org" + + merged-pr: + if: github.event.action == 'closed' && github.event.pull_request.merged == true && github.repository == 'rtic-rs/cortex-m-rtic' + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: send message + uses: s3krit/matrix-message-action@v0.0.3 + with: + room_id: ${{ secrets.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} + message: "PR merged: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})" + server: "matrix.org" + + abandoned-pr: + if: github.event.action == 'closed' && github.event.pull_request.merged == false && github.repository == 'rtic-rs/cortex-m-rtic' + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: send message + uses: s3krit/matrix-message-action@v0.0.3 + with: + room_id: ${{ secrets.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} + message: "PR closed without merging: [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})" + server: "matrix.org" |
