- Commits would add the messages to cards.
- Some commands could move cards through a Kanban flow.
I wanted to do things like this:
git commit -m 'added a bunch of code to start 24'
And have card 24 move from my "Ready for Development" list to my "Doing" list, adding the commit message to the card as a comment.
This post will serve as a general set up guide for the whole thang.
Set up Heroku
Go get a free account here. Follow the instructions to install the terminal tools. Login with your account.
Gather config values
- api_key - Go to https://trello.com/1/appKey/generate
- oauth_token - Go to
https://trello.com/1/authorize?response_type=token&name=Trello+Github+Integration&scope=read,write&expiration=never&key=[your-key-here]_ replacing __[your-key-here]__with the api_key from above. Authorize the request:
And record the token.
https://trello.com/board/trello-development/4d5ea62fd76aa1136000000cthe board id is 4d5ea62fd76aa1136000000ca. - …listtargetid - These can be found by opening a card in the list, exporting it as json, and grabbing the "idList" value.
Deploy to Heroku
Follow these steps replacing the flagged values, with the ones you gathered above:
- Clone this repo
cd github-trello- go into that directory
heroku create- create the Heroku app
heroku config:add api_key=<API_KEY> oauth_token=<OATH_TOKEN> board_id=<BOARD_ID> start_list_target_id=<ID> finish_list_target_id=<ID>- add all your details
git push heroku master- deploy!
Now the server should be running on Heroku.
Set up GitHub
Simply add your Heroku app URL + "/posthook" as a WebHook URL under "Admin" for your repository. Example:
Now when you commit to your git repo with the right flags:
perwill move the card to a list specified in configuration by the
fixwill move the card to a list specified in configuration by the
Your Trello card will be updated with a comment or moved between lists, something like this: