From 24652abe8ab29637d20b252df9b3929aea8858d5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 3 Jul 2022 00:28:38 +0200 Subject: [PATCH] CI: another stab at PR notifications --- .github/workflows/pullrequest.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index dbf9cd6da..5026a4444 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -8,25 +8,20 @@ jobs: notify: runs-on: ubuntu-latest steps: - - name: "notify: any" + - name: "notify: new" + if: github.event.action == 'opened' uses: calamares/actions/matrix-notify@v4 with: token: ${{ secrets.MATRIX_TOKEN }} room: ${{ secrets.MATRIX_ROOM }} message: | - PR something ${{ github.event.pull_request.html_url }} by ${{ github.actor }} ${{ github.event.pull_request.action }} - .. ${{ github.event.pull_request.title }} - - 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 }}" + PR OPENED ${{ github.event.pull_request.html_url }} by ${{ github.actor }} + .. ${{ github.event.pull_request.title }}" - name: "notify: closed" - if: github.event.pull_request.action == 'closed' + if: github.event.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 }}" + message: | + PR CLOSED ${{ github.event.pull_request.html_url }} by ${{ github.actor }}