Never leave the command line to update a ticket again.
pip install accountable
or
git clone https://github.com/wohlgejm/accountable
cd accountable
python setup.py install
Once installed, configure your account:
accountable configure
List all projects:
accountable projects
List all issue types:
accountable issuetypes
or accountable issuetypes DEV
Create an issue:
accountable createissue project.id 10000 issuetype.id 3 summary 'Yuge bug'
See the Jira API docs for a full list of fields. Custom fields are also supported.
List metadata for an individual issue:
accountable issue DEV-101
Add a comment to an issue:
accountable issue DEV-102 addcomment "[~tpm] I'm BLOCKED"
List available transitions for an issue:
accountable issue DEV-103 transitions
Do a transition for an issue:
accountable issue DEV-104 dotransition 1
Currently, only Basic Auth is supported. Running accountable configure
will prompt you to enter
your username, password, and Jira domain.
Since every account can be setup differently, you might want to view custom fields for an issue. By default, the following fields are displayed when examining an issue:
- Reporter - Display name
- Assignee - Display name
- Issue type - name
- Status - Status category - name
- Summary
- Description
These defaults can be changed by editing your ~/.accountable/config.yaml
. Nesting fields is supported. Check out
the Jira documentation here for information
on fields in the payload.
Accountable can be used in conjunction with git.
For example, if you want to start work and there isn't a ticket created for it, you can use the checkoutbranch
command.
accountable checkoutbranch summary 'Refactoring foo' project.id 1 issuetype.id 1000
This will create a new ticket and check you out to a branch. The branch name will be the newly created ticket's key followed by the slugified summary.
accountable checkout DEV-101
will checkout a branch with the ticket's slugified summary.
Add the following to your .bashrc file:
`
eval "$(_ACCOUNTABLE_COMPLETE=source accountable)"
`
Two default aliases are configured by default:
- cob -> checkoutbranch
- co -> checkout
You can set up your own custom aliases by specifying them in your config file.
Jira already supports robust triggers, like changing a ticket's status based on a pull request or a branch being created. You can also transition tickets with commit messages.
However, there are times when these automated triggers fall short.
Here's where I get frustrated with Jira:
- I need to add a comment to a story for the product manager. Opening the browser to do this this breaks my concentration.
- I start work locally and don't push up a branch immediately. This doesn't trigger an automated transition.
- I don't like smart commit messages. Commit messages should reference the issue and be a concise, grepable implementation note for your fellow developers. Smart commits muck up the history.
- I start a story and realize that a refactor, usually to allow for extension, is required before work on the requirements can start. The refactor should be in it's own pull request, so I forget to create a ticket and that work goes untracked.
Paired with git, this project attempts to solve these issues.