abinoda / slack-action

GitHub Action for posting Slack messages
MIT License
270 stars 37 forks source link

Support multiline payloads #18

Closed robpc closed 4 years ago

robpc commented 4 years ago

Multiline messages like

args: |-
  '{
    "channel": "GK32Z5RV1",
    "text": ":docker: image  was built successfully",
  }'

Produce errors from the api

{"ok":false,"error":"json_not_object","warning":"missing_charset","response_metadata":{"warnings":["missing_charset"]}}

Wrapping the payload in ' removes that error

jvassbo commented 4 years ago

@robpc @abinoda This seems to have broken single-line payloads. All our actions now produces same error as this PR fixes for multiline.

abinoda commented 4 years ago

@jvassbo Will revert!