kasunkv / slack-notification

Slack Notification task with advanced slack message customization for Visual Studio Team Services
MIT License
20 stars 9 forks source link

Support sending JSON #23

Open robertjahn opened 5 years ago

robertjahn commented 5 years ago

I have tried to send JSON with the Send Chat Message attachment section or the Upload File option. Perhaps there is just some syntax required, but what happens is I just see the left bracket of the json that I specify as an argument. I have tried with surrounding in triple back-ticks ``` too.

robertjahn commented 5 years ago

Note that I can get this to works for making an attachment, but I would like to view the json in the slack message so that I dont have to open the attachment In script task do this

set my json contents into a variable called Json - then save to a file in the release Out-File -FilePath "$(System.DefaultWorkingDirectory)\mydata.json" -InputObject $Json in the slack task upload argument $(System.DefaultWorkingDirectory)/mydata.json