By adding this hook, every commit with a card number hashtag (eg. #345) will add a comment with changeset details of this commit.
- Put the src/trello.py script somewhere outside of your project document
- Open the .hg/hgrc document of the repository where you want to use this hook
- Under the
[hooks]
section addpretxncommit.trello = python:/path/to/trello.py:comment_changeset
Now create a [trello]
section and configure your board specific settings:
user
: Your trello username (put an @ in front to get notifications)board
: The id of your board (found in the URL when viewing your Trello board)key
: Generate a key on the Trello key generation page, while being logged intoken_read
: A read token, in your browser go to this URL and accept:https://trello.com/1/authorize?key=[TRELLO_KEY]&name=[CHOOSE_APP_NAME]&expiration=never&response_type=token
You'll find your key on the next page.token_write
: A write token, in your browser go to this URL and accept:https://trello.com/1/authorize?key=[TRELLO_KEY]&name=[CHOOSE_APP_NAME]&expiration=never&response_type=token&scope=read,write
You'll find your key on the next page.
When commiting a changeset add a cardnumber hashtag somewhere in your commit message.
eg. hg commit -m 'This changset will post to card #123'