chore: Follow up matrix notification

Signed-off-by: Krille <c.kussowski@famedly.com>
pull/1784/head
Krille 7 months ago
parent 8a2b9933b3
commit ce9a0f0e4f
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -13,14 +13,14 @@ jobs:
steps:
- name: Send Matrix Notification
env:
MATRIX_URL: https://matrix.org/_matrix/client/v3/rooms/${{ secrets.MATRIX_MANAGEMENT_ROOM }}/send/m.room.message
MATRIX_URL: https://matrix.janian.de/_matrix/client/v3/rooms/${{ secrets.MATRIX_MANAGEMENT_ROOM }}/send/m.room.message
run: |
if [ "${{ github.event.action }}" == "opened" ]; then
PAYLOAD="{\"msgtype\": \"m.text\", \"body\": \"New Issue Created: ${{ github.event.issue.title }}\\nCreated by: ${{ github.event.issue.user.login }}\\n${{ github.event.issue.body }}\\nURL: ${{ github.event.issue.html_url }}\"}"
PAYLOAD="{\"msgtype\": \"m.notice\", \"body\": \"New Issue Created: ${{ github.event.issue.title }}\\nCreated by: ${{ github.event.issue.user.login }}\\n${{ github.event.issue.body }}\\nURL: ${{ github.event.issue.html_url }}\"}"
elif [ "${{ github.event.action }}" == "created" ]; then
PAYLOAD="{\"msgtype\": \"m.text\", \"body\": \"New Comment from ${{ github.event.comment.user.login }}\\n${{ github.event.comment.body }}\\nURL: ${{ github.event.comment.html_url }}\"}"
PAYLOAD="{\"msgtype\": \"m.notice\", \"body\": \"New Comment from ${{ github.event.comment.user.login }}\\n${{ github.event.comment.body }}\\nURL: ${{ github.event.comment.html_url }}\"}"
fi
curl -XPOST -H "Authorization: Bearer ${{ secrets.MATRIX_BOT_TOKEN }}" \
curl -X POST -H "Authorization: Bearer ${{ secrets.MATRIX_BOT_TOKEN }}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
$MATRIX_URL

Loading…
Cancel
Save