Skip to content

Improve readability of setup step (#118) #6

Improve readability of setup step (#118)

Improve readability of setup step (#118) #6

name: Notify matrix room when a pull request is opened (or reopened) or merged (or rebased)
# pull_request payload docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request
on: {}
# pull_request:
# types: [opened, reopened, ready_for_review, closed]
jobs:
ping_matrix_when_opened:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft != true
runs-on: ubuntu-latest
steps:
- name: send message for pr opening
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: 'PR [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) was opened.'
server: 'matrix.org'
- run: |
echo The PR was opened
ping_matrix_when_merged:
if: github.event.pull_request.state == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: send message for merge
uses: s3krit/[email protected]
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: 'PR [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) was merged.'
server: 'matrix.org'
- run: |
echo The PR was merged