Skip to content

Commit d203cc2

Browse files
committed
escape special chars in commit messages via pipe
1 parent c93852f commit d203cc2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/notify-irc.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
- master
66
jobs:
77
notify:
8-
name: Send request
8+
name: Checkout and notify
99
runs-on: ubuntu-latest
1010
steps:
11-
- run: |
12-
curl "${{ secrets.IRC_NOTIFY_URL }}" -F target=#gonic -F 'message=push to master (@${{ github.event.head_commit.author.username }}) ${{ github.event.head_commit.message }}' >/dev/null 2>&1
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
- name: Notify
14+
run: |
15+
set +x e
16+
git log -1 --pretty="push to master (@%an) %s" | curl "${{ secrets.IRC_NOTIFY_URL }}" -F target=#gonic -F message=@- >/dev/null 2>&1
1317
exit 0

0 commit comments

Comments
 (0)