I want to leverage Trello Automation to create a pull request on my Bitbucket repo via Bitbucket Rest API.
Given a Trello card which has a number and a name. In Automation, we have corresponding variables: {cardnumber} and {cardname}
I created a rule like this:
post to url:
https://api.bitbucket.org/2.0/repositories/plb-alana/alana/pullrequests
payload (represented as JSON object):
{\n "title": {cardname},\n "source": {\n "branch": {\n "name": "feature/"{cardnumber}"/"{cardname}\n }\n },\n "destination": {\n "branch": {\n "name": "staging"\n }\n }\n}
But looks like the Automation didn't substitute my variables into actual values.
Can I confirm automation variables are working in such use case ?
@Quoc-Hung Hoang
I will not speak to the specific of your payload. It should not have all \n or / etc just text.
@milynnus is correct about not needing the \n
It should have the format:
{"name1":"value1","name2":"value2"}
or
{"name1": {"nestedname1" :"nestedvalue1"},"name2": {"nestedname2" :"nestedvalue2"}}
Regarding variables, they do seem to be hit and miss.
If you find {cardname}, {cardnumber} dont work, try {triggercardname}, {triggercardnumber}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.