Skip to main content

jira-creator

Build Status Python License Last Commit

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 .tmpl files located under templates/
  • Employs TemplateLoader for 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.

Metadata

Release files for jira-creator 0.0.46

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jira-creator 0.0.46
File Size Uploaded
jira_creator-0.0.46.tar.gz 168.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jira-creator 0.0.46
File Interpreter ABI Platform
jira_creator-0.0.46-py3-none-any.whl Python 3 none any Details

Total release size: 446.2 kB

Release files / jira_creator-0.0.46.tar.gz

Download URL jira_creator-0.0.46.tar.gz
Size 168.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0ba9cedb5021ad48bf6c567b441e477509e97642bb714963f7af1d6c62a794e2
BLAKE2b-256 checksum
How to use checksums
5781e196e0a800ee0441fabb16cf09a3c49c480269a53fb72613b95f275c51bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / jira_creator-0.0.46-py3-none-any.whl

Download URL jira_creator-0.0.46-py3-none-any.whl
Size 278.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
816d9be45c0ddeb92f357943a21cb6bfb1244a118f331ddb1609d716995236d0
BLAKE2b-256 checksum
How to use checksums
3c0dbb7ab657d4a1ca99ffdfb0dd8e03058d99061db65e95cb5a41432ade9cd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.9

2 release files

1.0.3

2 release files

1.0.1

2 release files

This release

0.0.46 This release

2 release files

0.0.44

2 release files

0.0.43

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.39

2 release files

0.0.38

2 release files

0.0.37

2 release files

0.0.36

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.30

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.17

2 release files

0.0.12

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page