CI: another stab at PR notifications

This commit is contained in:
Adriaan de Groot 2022-07-03 00:28:38 +02:00
parent f5891e1c8c
commit 24652abe8a

View File

@ -8,25 +8,20 @@ jobs:
notify: notify:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "notify: any" - name: "notify: new"
if: github.event.action == 'opened'
uses: calamares/actions/matrix-notify@v4 uses: calamares/actions/matrix-notify@v4
with: with:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} room: ${{ secrets.MATRIX_ROOM }}
message: | message: |
PR something ${{ github.event.pull_request.html_url }} by ${{ github.actor }} ${{ github.event.pull_request.action }} PR OPENED ${{ github.event.pull_request.html_url }} by ${{ github.actor }}
.. ${{ github.event.pull_request.title }} .. ${{ 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 }}"
- name: "notify: closed" - name: "notify: closed"
if: github.event.pull_request.action == 'closed' if: github.event.action == 'closed'
uses: calamares/actions/matrix-notify@v4 uses: calamares/actions/matrix-notify@v4
with: with:
token: ${{ secrets.MATRIX_TOKEN }} token: ${{ secrets.MATRIX_TOKEN }}
room: ${{ secrets.MATRIX_ROOM }} 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 }}