Skip to content

helps in the creation of stories,issues,epics,bugs,spikes

License

Notifications You must be signed in to change notification settings

dmzoneill/jira-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

πŸ”Ž 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'"

πŸ“ƒ 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'

πŸͺ² 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"

πŸ“ 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

πŸ“₯ 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

πŸ“ˆ 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

πŸ”’ 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.

About

helps in the creation of stories,issues,epics,bugs,spikes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages