After some experimenting with Zapier, I've managed to create a "zap" (i.e. automatic handler) that does the following:
Suppose you're working on a feature which has the following Trello card: https://trello.com/c/NuSGfssX/
You push a commit to Bitbucket, which commit message contains tr(NuSGfssX)
, e.g.:
hg ci -m "Finished the very important feature tr(NuSGfssX)"
A new Trello card comment is automatically created, containing information about the commit.
Here is how it's done with Zapier:
Create a new zap with services BitBucket (New Changeset) and Trello (Create Comment).
Link your Bitbucket and Trello accounts to Zapier. I used my existing Bitbucket account, though Zapier recommends creating a separate account (which will decrease your free Bitbucket plan:). I also had problems with linking my Trello account, please ask in comments if you had them too.
Select your Bitbucket repository owner and name.
Select your Trello board and List. Both are optional: you may know only the card ID and do not care about where it is. The Card ID is permanent.
In the "Card" field, select "Advanced: type in a custom value". Type {{message_tr}}
. The tr
is the your (any) chosen identifier, the same as you will use in commit messages.
Setup the Comment Text. My setup is the following (contains a backlink to the bitbucket comment):
{{message}}
author: {{author}}
branch: {{branch}}
[{{node}}](https://bitbucket.org/<repo_owner>/<repo_name>/commits/{{node}}/)
Files:
{{files}}
Click "Turn the Zap on". The Zap is created and starts working.