chore: Follow up matrix notification
Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
parent
c708cc8c9b
commit
8a2b9933b3
1 changed files with 1 additions and 2 deletions
3
.github/workflows/matrix_notification.yaml
vendored
3
.github/workflows/matrix_notification.yaml
vendored
|
|
@ -14,14 +14,13 @@ jobs:
|
||||||
- name: Send Matrix Notification
|
- name: Send Matrix Notification
|
||||||
env:
|
env:
|
||||||
MATRIX_URL: https://matrix.org/_matrix/client/v3/rooms/${{ secrets.MATRIX_MANAGEMENT_ROOM }}/send/m.room.message
|
MATRIX_URL: https://matrix.org/_matrix/client/v3/rooms/${{ secrets.MATRIX_MANAGEMENT_ROOM }}/send/m.room.message
|
||||||
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_BOT_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event.action }}" == "opened" ]; then
|
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.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 }}\"}"
|
||||||
elif [ "${{ github.event.action }}" == "created" ]; then
|
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.text\", \"body\": \"New Comment from ${{ github.event.comment.user.login }}\\n${{ github.event.comment.body }}\\nURL: ${{ github.event.comment.html_url }}\"}"
|
||||||
fi
|
fi
|
||||||
curl -XPOST -H "Authorization: Bearer $MATRIX_ACCESS_TOKEN" \
|
curl -XPOST -H "Authorization: Bearer ${{ secrets.MATRIX_BOT_TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$PAYLOAD" \
|
-d "$PAYLOAD" \
|
||||||
$MATRIX_URL
|
$MATRIX_URL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue