CLI and tools to automate JIRA issue creation
Project description
jira-creator
Effortlessly generate JIRA issues such as stories, bugs, epics, spikes, and tasks employing predefined templates and optional AI-boosted descriptions.
⚡ Quick Start Guide (Under 30 Seconds)
1. Config File Creation and Autocomplete Activation
mkdir -p ~/.bashrc.d
cat <<EOF > ~/.bashrc.d/jira.sh
export JIRA_JPAT="your_jira_personal_access_token"
export JIRA_AI_PROVIDER=openai
export JIRA_AI_API_KEY=sk-...
export JIRA_AI_MODEL="gpt-4o-mini"
export JIRA_URL="https://issues.redhat.com"
export JIRA_PROJECT_KEY="AAP"
export JIRA_AFFECTS_VERSION="aa-latest"
export JIRA_COMPONENT_NAME="analytics-hcc-service"
export JIRA_PRIORITY="Normal"
export JIRA_BOARD_ID=21125
export JIRA_EPIC_FIELD="customfield_12311140"
export JIRA_ACCEPTANCE_CRITERIA_FIELD="customfield_12315940"
export JIRA_BLOCKED_FIELD="customfield_12316543"
export JIRA_BLOCKED_REASON_FIELD="customfield_12316544"
export JIRA_STORY_POINTS_FIELD="customfield_12310243"
export JIRA_SPRINT_FIELD="customfield_12310940"
export JIRA_VOSK_MODEL="/home/daoneill/.vosk/vosk-model-small-en-us-0.15"
# Enable autocomplete
eval "$(/usr/local/bin/rh-issue --_completion | sed 's/rh_jira.py/rh-issue/')"
EOF
source ~/.bashrc.d/jira.sh
2. Command-line Tool Wrapper Link Creation
chmod +x jira_creator/rh-issue-wrapper.sh
sudo ln -s $(pwd)/jira_creator/rh-issue-wrapper.sh /usr/local/bin/rh-issue
3. Execute the Program
rh-issue create story "Improve onboarding experience"
🧪 Usage & Commands
This document describes the various commands that can be used to manage JIRA issues from the command-line.
:mag_right: Search Issues
The search command allows you to find issues using a JIRA Query Language (JQL) expression.
Example:
search "project = 'PROJ' AND status = 'In Progress'"
:page_with_curl: List Issues
The list-issues command retrieves a list of all issues in a specific project, with options to filter by component, assignee, status, summary and reporter. You can customize the output by specifying the columns to show and the order to sort them.
Example:
list-issues --project 'PROJ' --status 'In Progress' --columns 'key, summary, status' --sort 'key'
:beetle: Create Issue
The create-issue command is used to create a new issue. You can specify the type of the issue (bug, story, epic, task, spike) and its summary. The --edit flag allows you to modify the issue before it's created, while the --dry-run flag simulates the issue creation without actually doing it.
Example:
create-issue --type bug --summary "This is a test bug"
:pencil: Edit Issue
The edit-issue command allows you to modify an existing issue. The issue to edit is specified by its key. The --no-ai flag can be used to disable AI assistance during editing.
Example:
edit-issue --issue_key PROJ-123
:inbox_tray: Set Priority
The set-priority command allows you to change the priority of an issue. You can specify the issue by its key and set the priority to normal, major or critical.
Example:
set-priority --issue_key PROJ-123 --priority major
:chart_with_upwards_trend: Set Story Epic
The set-story-epic command links a story issue to an epic issue. Both the story issue and the epic issue are specified by their keys.
Example:
set-story-epic --issue_key PROJ-123 --epic_key PROJ-124
:lock: Block and Unblock Issue
The block command allows you to block an issue, specifying the reason for the block. The unblock command removes the block from an issue. Both commands require the key of the issue.
Example:
block --issue_key PROJ-123 --reason "Waiting for PROJ-124"
unblock --issue_key PROJ-123
And many more...
Review each command and arguments to understand the depth of each command, and how it can be used to manage Jira issues effectively. It is recommended to always use the --dry-run flag when unsure about a command's effect.
🤖 AI Provider Support
You have the option to integrate different AI providers by modifying JIRA_AI_PROVIDER. Ollama can be employed to manage various models.
mkdir -vp ~/.ollama-models
docker run -d -v ~/.ollama-models:/root/.ollama -p 11434:11434 ollama/ollama
✅ OpenAI
export JIRA_AI_PROVIDER=openai
export JIRA_AI_API_KEY=sk-...
export JIRA_AI_MODEL=gpt-4 # Optional
🦙 LLama3
docker compose exec ollama ollama pull LLama3
export JIRA_AI_PROVIDER=LLama3
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=LLama3
🧠 DeepSeek
docker compose exec ollama ollama pull deepseek-r1:7b
export JIRA_AI_PROVIDER=deepseek
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=http://localhost:11434/api/generate
🖥 GPT4All
pip install gpt4all
export JIRA_AI_PROVIDER=gpt4all
# WIP
🧪 InstructLab
export JIRA_AI_PROVIDER=instructlab
export JIRA_AI_URL=http://localhost:11434/api/generate
export JIRA_AI_MODEL=instructlab
# WIP
🧠 BART
export JIRA_AI_PROVIDER=bart
export JIRA_AI_URL=http://localhost:8000/bart
# WIP
🪫 Noop
export JIRA_AI_PROVIDER=noop
🛠 Developer Setup
pipenv install --dev
Testing & Linting
make test
make lint
make super-lint
⚙️ Functionality Overview
- The tool gathers field definitions from
.tmplfiles located undertemplates/ - Employs
TemplateLoaderfor generating Markdown descriptions - Optionally applies AI for enhancing readability and structure
- Sends to JIRA through REST API (or performs a dry run)
📜 License
This project falls under the terms of the Apache License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jira_creator-1.0.3.tar.gz.
File metadata
- Download URL: jira_creator-1.0.3.tar.gz
- Upload date:
- Size: 168.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e8b7b7464f34b291d0f9bed1821b92f306c349d1f33f5c272664d5b3f47956
|
|
| MD5 |
cf236ebca999f785ae9a84537b6aef05
|
|
| BLAKE2b-256 |
8c6628bff2c5d31f1b9761c983ebddc6dbd90462e998461a5712dd858f60da2e
|
File details
Details for the file jira_creator-1.0.3-py3-none-any.whl.
File metadata
- Download URL: jira_creator-1.0.3-py3-none-any.whl
- Upload date:
- Size: 278.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488f9e35b94e491ce8e1864d4c2f242c13b03b966731b5caf6bf5cbd874bf48a
|
|
| MD5 |
8f8179e3591ad9966e3398604129498b
|
|
| BLAKE2b-256 |
1d498d6ff7bb0a70c4484657094967c4c6685aac4e2e48d56d3f98ac485cc968
|