-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Labels
docsImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested
Milestone
Description
I include the last commit message in my messaging, which works great until I recently did a revert and discovered that commit messages with double quotes break the action.
- name: Deploy Complete Success Notification
uses: slackapi/slack-github-action@v2.1.0
if: success()
env:
MESSAGE: "${{ github.event.workflow_run.head_commit.message || github.event.head_commit.message }}"
with:
method: chat.postMessage
token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
payload: |
channel: monitoring
text: "FRONTEND: Deployment of '${{ env.MESSAGE }}' to ${{ github.ref_name }} Completed"
I've tried wrapping env.MESSAGE in toJSON (as mentioned as a solution in #202), but that does not address the issue with double quotes it seems. I'm also not seeing any suggestions for how to overcome in https://tools.slack.dev/slack-github-action/sending-variables. What is the proper way to get this working correctly?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested