Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Request Post-Receive Hook not resolving the variables correctly in request body

nitin goyal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 23, 2020

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.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events