I have setup HTTP request Post-receive hook to notify on MS teams for every commit on remote branch and I want to see some more information like committer name and commit message as well.
I am able to get all the information but the formatting is not correct.
This is what my request looks like -
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "New Commit",
"sections": [{
"activityTitle": "Commit",
"facts": [ {
"name": "User",
"value":"'${user.displayName}'"
},{
"name": "Repository",
"value": '${repository.name}'
}, {
"name": "Message", "value":'${refChange.latest.message}'
}],
"markdown": false
}]
}
and my response in MS Teams is below -
Commit
User 'Goyal%2C+Nitin'
Repository test-functional
Message My+new+commit
so for reason when populating the variable bitbucket is not able to resolve the space and commas.
Any help is appreciated.