Skip to content

Commit

Permalink
Merge pull request #10 from greg0ire/documentation_improvements
Browse files Browse the repository at this point in the history
Documentation improvements
  • Loading branch information
zanker committed Jun 9, 2016
2 parents 4deeced + 0acf1b3 commit c82976a
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Overview
===
Allows you to manage or reference your Trello board through commits to Github. Tag a commit with "Closes 1234" to have a card automatically archived, or "Card 1234" to have the commit sent to the card.
Allows you to manage or reference your Trello board through commits to Github.
Tag a commit with "Closes 1234" to have a card automatically archived,
or "Card 1234" to have the commit sent to the card.

Commands
-
Commit messages are searched for `(case|card|close|archive|fix)e?s? \D?([0-9]+)` to find the card short id. Case/card resolve to on_start configuration, close/fix resolve to on_close, and archive will just archive the card regardless.
Commit messages are searched for `(case|card|close|archive|fix)e?s? \D?([0-9]+)`
to find the card short id. Case/card resolve to `on_start` configuration,
close/fix resolve to `on_close`, and `archive` will just archive the card regardless.

The commit message is added as a comment to the card as well.

Expand All @@ -17,18 +21,28 @@ On the first run, it will create an empty configuration file for you that you wi

You will need to get your api key and OAuth token with read/write access that won't expire for this to work. You can either use your own account, or create a separate deployment one for this.

Go to https://trello.com/1/appKey/generate to get your key, then 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 key Trello gave you. Authorize the request and then add the token and key to your trello.yml file.
Go to `https://trello.com/1/appKey/generate` to get your key, then 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 key Trello gave you.
Authorize the request and then add the token and key to your trello.yml file.

You can get the board id from the URL, for example https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c the board id is _4d5ea62fd76aa1136000000ca_.
You can get the board id from the URL, for example in
`https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c` the
board id is `4d5ea62fd76aa1136000000ca`.

There are 3 actions you can configure to decide what happens to a card, __on_start__ for case/card, __on_close__ for close/fix. __on_deploy__ requires an additional hookin to your deployment that you can read below.
There are 3 actions you can configure to decide what happens to a card,`on_start`
for case/card, `on_close` for close/fix. `on_deploy` requires an additional hookin
to your deployment that you can read below.

You can find out list ids at the following url : `https://api.trello.com/1/board/your_board_id/lists?key=your_key&token=your_token`

Deployment
-

If you are moving your cards to a new list (such as "Live") after deployment, then you must use the __move_to__ option in __on_close__. Unlike __on_start__ or __on_close__, you must also specify the repo name for __move_to__.
If you are moving your cards to a new list (such as "Live") after deployment,
then you must use the `move_to` option in `on_close`. Unlike `on_start` or `on_close`, you must also specify the repo name for `move_to`.

You indicate a deploy happened through sending a POST request to __http://foobar.com:4000/deployed/[repo-name]__. An example of a Capistrano deployment script:
You indicate a deploy happened through sending a POST request to `http://foobar.com:4000/deployed/[repo-name]`. An example of a Capistrano deployment script:

require "net/https"
Capistrano::Configuration.instance(:must_exist).load do
Expand All @@ -40,4 +54,4 @@ You indicate a deploy happened through sending a POST request to __http://foobar
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
http.request_post(uri.path, "")
end
end
end

0 comments on commit c82976a

Please sign in to comment.