From c03850a302f5cf1894d5c53c83baa704decc51c1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 2 Jul 2022 17:19:11 +0200 Subject: [PATCH] CI: notify on pull-requests --- .github/workflows/pullrequest.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pullrequest.yml diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml new file mode 100644 index 000000000..5394a268a --- /dev/null +++ b/.github/workflows/pullrequest.yml @@ -0,0 +1,24 @@ +name: pullrequest + +on: + pull_request: + types: [opened, closed] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: "notify: new" + if: github.event.pull_request.action == 'opened' + uses: calamares/actions/matrix-notify@v4 + with: + token: ${{ secrets.MATRIX_TOKEN }} + room: ${{ secrets.MATRIX_ROOM }} + message: "NEW PR ${{ github.event.pull_request.html_url }} by ${{ github.actor }} ${{ github.event.pull_request.title }}" + - name: "notify: closed" + if: github.event.pull_request.action == 'closed' + uses: calamares/actions/matrix-notify@v4 + with: + token: ${{ secrets.MATRIX_TOKEN }} + room: ${{ secrets.MATRIX_ROOM }} + message: "CLOSED ${{ github.event.pull_request.html_url }} by ${{ github.actor }} ${{ github.event.pull_request.title }}"