Geera is a command line tool for dealing with Jira tickets.
-
Uses soap4r
Geera provides a command line tool for interacting with the Jira ticketing system.
After you’ve installed Geera, you must configure your ~/.geera file like this:
$ geera setup
That command will create a $HOME/.geera file for you to fill out. The config file will look something like this:
--- url: FIXME username: FIXME qa: FIXME password: FIXME
The “url” value should point to the Jira API url. “username” and “password” are your username and password for the Jira system. When running “geera fix”, the ticket will be automatically reassigned to the username listed in “qa”. If the “qa” value is removed, the ticket will not be reassigned when the ticket is fixed.
Geera commands have the basic form of “geera ACTION TICKET”, where ACTION is the action you want to perform, and TICKET is the ticket on which you wish to perform that action.
The current available commands are:
* start * fix * assign * take * create * comment * list
The “start” command lets you start a ticket. This command only works when the ticket is in a startable state. For example:
$ geera start BZ-1000
This command will set the state of BZ-1000 to “start”. If the ticket is not in a startable state, an error will be displayed.
The “fix” command puts the ticket in to a fixed state. If the ticket is startable, it will first start the ticket, then put the ticket in fixed state.
$ geera fix BZ-1000
The ticket BZ-1000 should be in the “fixed” state. If a user is specified in the “qa” section of the configuration file, the ticket will be automatically reassigned to that user.
The “assign” command reassigns a ticket to another user. The following command will reassign the ticket BZ-1000 to the user “foo”:
$ geera assign BZ-1000 foo
The “take” command is similar to the “mv” command, but assigns the ticket to the user listed in the “username” section of the configuration file. This command is useful when you wish to “take” a ticket from someone:
$ geera take BZ-1000
The “create” command will create a new ticket in the JIRA system. It requires a project name on which to create the ticket. For example, if you want to create a ticket in the “BZ” project, the command will look like this:
$ geera create BZ
This command will open $EDITOR with a form to fill out. Enter the details of the ticket, and the ticket will be created.
The “comment” command lets you comment on a ticket. Comments are passed in through the -m flag. For example:
$ geera comment BZ-1000 -m'This is a comment'
The “list” command lets you list tickets in a filter. You can then take the ticket numbers returned and assign them or whatever.
$ geera list 1138
This command prints out the first 10 tickets in the 1138 filter. Of course, named filters would be much nicer. If you add a “filters” hash in your ~/.geera file, you can assign names to filter ids.
filters:
all: 12482 features: 12481 bugs: 12480
Then you can run:
$ geera list bugs
And get the tickets from filter id 12480.
An optional “-m” flag is available on every command. The “-m” flag will automatically attach a comment to the ticket in addition to the original command performed. For example, we can fix a ticket and add a comment at the same time by doing:
$ geera fix BZ-1000 -m'I totally fixed this ticket'
First, start the ticket, then do work, then fix the ticket:
$ geera start BZ-1000 -m'starting to work on awesome feature' $ ... $ ... $ geera fix BZ-1000 -m'finished awesome feature'
Maybe you need to add comments while fixing stuff:
$ geera start BZ-1000 -m'starting to work on awesome feature' $ ... $ geera comment BZ-1000 -m'I had to totally do this thing' $ ... $ geera fix BZ-1000 -m'finished awesome feature'
You do some work, then need to give the ticket to someone else:
$ geera start BZ-1000 -m'starting to work on awesome feature' $ ... $ geera mv BZ-1000 coworker -m'This was too hard for me!'
-
sudo gem install geera
(The MIT License)
Copyright © 2010 ATT Interactive
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.