Closed andreycha closed 4 months ago
A couple of interesting things here:
However, if I remove the ####
from the template it works ok.
I think #
is a keyword in velocity. Does it need to be there for mattermost?
Oddly, it is fine for the build number, but not the set at the beginning.
So this is what I have and it's working for me when I use the local test endpoint http://localhost:8111/webhooks/endpoint.html
.
{
"channel_id": "some_id",
"message": ":red_circle: Build failed\n\n| Build | Branch | Version | Status |\n|:---|:---:|:---:|:---|\n| ${projectName} / ${buildName} | ${branchDisplayName} | #${buildNumber} | [${buildStatus}](${buildStatusUrl}) |"
}
Note; i have not tested this with Mattermost.
Doh >.< Thanks, this is it! Thought Velocity is a bit more intelligent, luckily there are different ways to escape #
.
Hi, I'm using the plugin to post messages to Mattermost. I've added a standard JSON template:
Works like a charm:
Now I wanted to extend it with information from
$(changes)
variable using Velocity and switched the template payload format to JSON Velocity. I haven't done any changes in the template text itself, but Mattermost already started to return 400 Bad Request and preview started to also give an error:Checked the documentation once again but didn't find anything. Would be grateful if you can point to where the issue is. Plugin version is 2.0.0.