Prevent blank lines being sent to IRC
Hello!
Looking for a bit of help wrt fixing https://github.com/wikimedia/composer-merge-plugin/issues/201
Using this config:
- name: irc push
uses: rectalogic/notify-irc@v1
if: github.event_name == 'push'
with:
channel: "#wikimedia-dev"
nickname: wikimedia-github
message: |
${{ github.repository }}#${{ github.run_id }} (${{ github.base_ref }} - ${{ github.sha }} ${{ github.actor }}): ${{ join(github.event.commits.*.message) }} - https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
Results in the bot joining, sending the desired line, then sending a line with just a trailing space, then quitting...
[19:39:19] --> wikimedia-github ([email protected]) has joined #wikimedia-dev
[19:39:19] <wikimedia-github> wikimedia/composer-merge-plugin#476090360 ( - 6415d88441c6873cb1f6dc5c199a8e638fe23752 reedy): Migrate to GitHub Actions - https://github.com/wikimedia/composer-merge-plugin/actions/runs/476090360
[19:39:19] <wikimedia-github>
[19:39:19] <-- wikimedia-github ([email protected]) has left #wikimedia-dev
How do I prevent/stop that blank line being sent?
Thanks in advance!
Seems this might be related specifically to ${{ join(github.event.commits.*.message) }}. Swapped for ${{ job.status }} (as I didn't actually want the commit messages)...
[20:19:37] --> wikimedia-github ([email protected]) has joined #reedy
[20:19:37] <wikimedia-github> reedy/composer-merge-plugin#476137844 (refs/heads/fix-irc - 9d18b19e83cc71c7aec743fd61e45f443f27ef41 reedy): success - https://github.com/reedy/composer-merge-plugin/actions/runs/476137844
[20:19:37] <-- wikimedia-github ([email protected]) has left #reedy
So maybe a non issue
message: ${{ github.repository }}#${{ github.run_id }} (${{ github.base_ref }} - ${{ github.sha }} ${{ github.actor }}): ${{ join(github.event.commits.*.message) }} - https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
Would likely fix it. (Without the |, newline)
Did for me anyways.