DESCRIPTION:
Cargo is a set of tools to help streamline using git and Pivotal Tracker for agile development. Starting a story creates a new branch and finishing a story merges the branch back into master. This can be done either with browser integration or a set of command line tools.
More features will be added. This is still alpha software
INSTALL:
sudo gem install factorylabs-cargo --source=http://gems.github.com
Setup:
echo "api_key: YOUR_PIVOTAL_TRACKER_API_KEY" > ~/.cargo.yml
echo "project: PIVOTAL_TRACKER_PROJECT_ID" > RAILS_ROOT/.cargo.yml (optional hack will prompt for project if it isn't configured)
SYNOPSIS:
Git Wrapper Commands:
-
hack (start a new story and create a branch for that story)
use hack from the command line at the root of your project call it with a story id or with no arguments it will pull the unstarted stories from the Tracker project and allow you to choose one hack will start the story via the Pivotal Tracker API and start a new branch with the story name and id cargo[git:master] $ hack Already on "master" From [email protected]:factorylabs/cargo * branch master -> FETCH_HEAD Fetching tracker stories Choose a story 1) 'Keyword search' issues 2) 'Detail view' issues Enter story number: [Type # Here] Switched to a new branch "keyword_search_issues-1234" cargo[git:keyword_search_issues-1234] $
-
pack (switch to master and merge branch)
cargo[git:fix_issue_1234] $ pack Switched to branch "master" cargo[git:master] $ git status On branch master Your branch is ahead of 'origin/master' by 7 commits. nothing to commit (working directory clean) cargo[git:master] $
-
ship (switch to master and merge branch push to remote origin, delete topic branch, mark story as finished)
cargo[git:fix_issue_1234] $ ship Switched to branch "master" Counting objects: 60, done. Compressing objects: 100% (45/45), done. Writing objects: 100% (46/46), 16.92 KiB, done. Total 46 (delta 23), reused 0 (delta 0) To [email protected]:factorylabs/cargo.git 41e9cfb..b51cba0 master -> master cargo[git:master] $ git branch * master Marking story as finished cargo[git:master] $
-
yank (rebase current branch with latest from master)
cargo[git:fix_issue_1234] $ yank Switched to branch "master" From [email protected]:factorylabs/cargo * branch master -> FETCH_HEAD Switched to branch "fix_issue_1234" Current branch fix_issue_1234 is up to date. cargo[git:fix_issue_1234] $
Cargo Server:
-
cargo (runs the cargo server that listens for incoming events)
cargo[git:master] $ cargo => Starting Cargo 0.0.2 on http://0.0.0.0:8081 => Ctrl-C to shutdown server ** Cargo listening at 0.0.0.0:8081
To install the userscript in either Firefox, or the nightly build of WebKit (requirements outlined below) browse to localhost:8081/cargo.user.js
If you have the proper setup (Greasemonkey / GreaseKit) you’ll be prompted to install the user script. Once installed you’ll be asked when starting a story if a branch should be created automatically, and asked if you’d like your changes committed when finishing a story (prompting is configurable).
REQUIREMENTS:
The Cargo server and userscript integration for pivotal tracker requires one of the following setups:
-
Firefox 3.0.9+, and the Greasemonkey plugin that can be found at addons.mozilla.org/en-US/firefox/addon/748
Future support will include:
-
Nightly Build of WebKit (OS X r42858)+, and GreaseKit that can be found at 8-p.info/greasekit/
-
Fluid support should be coming with the next public update of Safari.
LICENSE:
(The MIT License)
Copyright © 2009 Factory Design Labs
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
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.