Scripts for working with the Jira API.
The main interaction is checking out a branch which corresponds to the next issue you should be working on.
You will need fish and python 3 installed.
You will also need the following environment variables:
JIRA_AUTH
- a base64-encoded USER:PASSWORD string.source read_jira_credentials
can help you set it. My username is my email and I made an API token at https://id.atlassian.com/manage/api-tokens.JIRA_HOST
- for example, hettps://sighten.atlassian.netJIRA_INITIALS
- this is used, with the current issue number, to make a branch based on the issue number.
For example, if JIRA_INITIALS
is set to razzi
and next_issue
returns PROP-67
, ./next
will checkout a branch named razzi/prop-67.
It's called JIRA_INITIALS
because many people use their first and last name's initials as part of their branch name, rather than their first name as I do.
$ pip install -r requirements.txt
$ make install
Checks out the branch for the next issue you should be working on.
~/project (develop) $ next
Switched to branch 'razzi/prop-67'
~/project (razzi/prop-67) $
Open the current issue to be worked on.
Prints the description of the current issue.
Prints the next issue you should be working on. Used by next
.
Source this to be prompted for your Jira username and password, which will be used to set JIRA_AUTH
.
This won't work with your Jira unless you have the same status names and fields. For now, manually edit lib.py.