Skip to content

Add changes detection to record editing #9334

Add changes detection to record editing

Add changes detection to record editing #9334

Workflow file for this run

name: Notify matrix chat server on GitHub events
on:
issues:
issue_comment:
release:
pull_request_review_comment:
types: [ created ]
pull_request:
types: [ opened, reopened, closed ]
workflow_run:
workflows: [release]
types: [completed]
jobs:
send-message:
runs-on: ubuntu-20.04
name: Send message via Matrix on issue
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
#########################################################################################################
# only if not a comment
- name: Issue created, edited or deleted
if: ${{ !github.event.comment && github.event.issue }}
id: matrix-chat-issue
uses: fadenb/[email protected]
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
**${{ github.triggering_actor }}** ${{ github.event.action }} an issue **[#${{ github.event.issue.number }} ${{ github.event.issue.title }} ](${{ github.event.issue.html_url }})** in ${{ github.event.repository.name }}:
> ${{ github.event.issue.body }}
- name: Issue comment created, edited or deleted
if: github.event_name == 'issue_comment'
id: matrix-chat-issue-comment
uses: fadenb/[email protected]
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
**${{ github.triggering_actor }}** ${{ github.event.action }} a comment on issue **[#${{ github.event.issue.number }} ${{ github.event.issue.title }} ](${{ github.event.issue.html_url }})** in ${{ github.event.repository.name }}:
> ${{ github.event.comment.body }}
#########################################################################################################
# only for PR actions
- name: Pull Request created, edited or deleted
if: github.event_name == 'pull_request'
id: matrix-chat-pr
uses: fadenb/[email protected]
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
**${{ github.triggering_actor }}** ${{ github.event.action }} a PR **[#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }} ](${{ github.event.pull_request._links.html.href }})** in ${{ github.event.repository.name }}:
> ${{ github.event.pull_request.body }}
# only for PR comments
- name: Send message on PR review
if: github.event_name == 'pull_request_review'
id: matrix-chat-pr-reviewed
uses: fadenb/[email protected]
with:
homeserver: ${{ secrets.MATRIX_HOME_SERVER }}
token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
channel: ${{ secrets.MATRIX_ROOM_ID }}
message: |
**${{ github.triggering_actor }}** ${{ github.event.action }} a PR review **[#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }} ](${{ github.event.pull_request._links.html.href }})** in ${{ github.event.repository.name }}:
> ${{ github.event.pull_request.body }}