Project

t1k

0.01
No release in over 3 years
Low commit activity in last 3 years
Use those scripts to create automatically branchs associated with issues and tracked commits.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0.1
>= 0
~> 10.0
~> 0.11.2

Runtime

~> 1.2.1
~> 0.18
~> 2.0.0
 Project Readme

T1K Code Climate

T1K - Automated Git and Trello Workflow

Use those scripts to automatically create branchs associated with issues and tracked commits with cards on Trello.

T1k allow you from command line to use some tasks to make easy to create brach, commit, create an issue and track it down in a Trello's card.

  • T1K
    • Getting started
      • T1000 Configuration File
    • Commands
      • Help
      • Validate
      • Init
      • Hack
      • Commit
      • Sink
      • Ship
    • License

Getting started

Install in your system T1k's gem

$ gem install t1k

Start using t1k into your project directory

$ t1k init

It creates the T1000 configuration file inside your project folder.

T1000 Configuration File

Here is a possible configuration for github and trello. Your T1000 should look like this:

T1k.setup do |config|
  # Setup Github repository credentials
  # Create an auth_token here: https://github.com/settings/applications
  #
  # config.repository.adapter = :github
  # config.repository.setup do |c|
  #   c.user = "GITHUB_USER"
  #   c.repo = "REPOSITORY_NAME"
  #   c.oauth_token = "YOUR_GITHUB_AUTH_TOKEN"
  # end

  # If you'll use bitbucket as repository you should set a shell variable with
  # your password as BITBUCKET_PWD in order to access bitbucket api
  #  config.repository.adapter = :bitbucket
  #  config.repository.setup do |c|
  #    c.user        = "YOUR_BITBUCKET_USERNAME"
  #    c.repo        = "REPOSITORY_NAME"
  #    c.password    = "#{ENV['BITBUCKET_PWD']}"
  #  end

  # Setup Trello board credentials
  #
  # Trello APP_DEVELOPER_KEY: https://trello.com/app-key
  # Trello App permission key: https://trello.com/1/connect?key=YOUR_KEY&name=BOARD_NAME&expiration=never&response_type=token&scope=read,write
  #
  # config.tracker.adapter = [:trello, :pivotal, :none]
  # config.tracker.setup do |c|
  #   c.user_name = "TRELLO_USER"
  #   c.board_name = "TRELLO_BOARD_NAME"
  #   c.member_token = "TRELLO_APP_TOKEN"
  #   c.developer_public_key = "TRELLO_DEVELOPER_PUB_KEY"
  # end
end
  • When using :github as your repository, you must define :oauth_token, :user, :repo.
  • When using :trello as your tracker, you must define :developer_public_key, :member_token, :user_name and :board_name. Get your :developer_public_key here and the :member_token you must replace your developer key in the url https://trello.com/1/authorize?key=YOURAPIKEY&response_type=token&expiration=never&scope=read,write.
  • When using :none as your tracker, T1k will create issues with the name passed as argument on t1k hack <issue-name>

Commands

Basic workflow with Trello as Tracker:

$ t1k hack yk2adi9
$ t1k commit -m 'commit message'
$ t1k commit -m 'finish issue and close it' -c
$ t1k sink
$ t1k ship

Help

t1k --help

Usage: t1k [command] [options]

  Commands:
    commit,cmt                                          # Commit current staged changes
    hack,hck <card_url>                                 # Checkout to a new branch or existing branch associated with tracked card (issue)
    init,setup                                          # Create T1000 credentials file template in your current folder
    ship,pack,deliver                                   # Delivery your changes to local and remote master branch
    sink,sync                                           # Update current branch with master (ie Sync with master)
    validate                                            # Validate current credentials
    help [<command>]                                    # Display help

  Options:
    -v, --version                                       # Display the current version
    -h, --help                                          # Display this help message

Validate

Validates your current credentials stored in T1000 file

Init

Just adds to your project folder a T1000 config file template

Hack

When you type $ t1k hack 18asd92 t1k creates or switches to a branch associated to a card.

  • Where 18asd92 can be the card identifier or any url part of its.

Commit

Commit has to params options, -m and -c.

Usage: t1k commit,cmt [options]

  Options:
    -c, --[no-]close                                    # Close current branch and resolves issue
    -m, --message <message>                             # Add a message to the commit
    -h, --help                                          # Display this help message
  1. t1k commit : just commits your staged changes (no message is added) not recommended
  2. t1k commit -m 'message' : commits your staged changes with a custom message
  3. t1k commit -c -m 'message' : -c is used to close your issue.

Sink

Just sync with master your current branch

Ship

It deliveries to master (local and remote) your branch and changes current branch to master

Contributing

#TODO

License

MIT License (MIT)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.