Skip to content

A CLI that takes a requirements document and automatically creates suitable JIRA tickets for you.

License

Notifications You must be signed in to change notification settings

loftwah/auto-jira

Repository files navigation

AI-Powered Jira Ticket Generator

The AI-Powered Jira Ticket Generator is a CLI tool that leverages OpenAI to transform high-level project requirements into detailed Jira tickets. Whether your input is in HTML, Markdown, or plain text, the tool uses GPT-4 (or later) to generate tickets complete with metadata, risk assessments, and pull request details.

Key Features

  • Input Parsing: Supports HTML, Markdown, and plain text.
  • Ticket Generation: Produces comprehensive Jira tickets including:
    • Title and description
    • Dependencies
    • Risk analysis
    • Pull request details
  • Modes:
    • Interactive Mode: Iteratively refine tickets with live feedback.
    • Non-Interactive Mode: Generate tickets in a one-shot command.
  • Customizable Integration: Configure OpenAI API URL and API key as needed.
  • Output Formats: Defaults to Markdown; JSON output is also supported.

Getting Started

Prerequisites

  • Python 3.12 or later
  • uv for virtual environment and dependency management
  • Python dependencies:
    • openai>=1.12.0,<2.0.0
    • mistune>=3.0.0
    • beautifulsoup4>=4.12.0
    • lxml>=5.1.0
    • python-dotenv>=1.0.0

Setup Instructions

  1. Create and activate a virtual environment:
    uv venv
    # On Linux/Mac:
    source .venv/bin/activate
    # On Windows:
    .venv\Scripts\activate
  2. Install dependencies:
    uv pip install -r requirements.txt

Running the Application

Non-Interactive Mode (Automated Ticket Generation)

For a fast, one-shot ticket generation from a requirements file, run:

uv run app.py --file requirements.md --non-interactive

Additional options:

  • --model <model-name>: Specify the AI model (default: 'gpt-4o')
  • --api-url <url>: Set a custom API URL (default: 'https://api.openai.com/v1/')
  • --api-key <key>: Provide an API key
  • --output-format <format>: Choose output format ('markdown' or 'json')

What to Expect:

  • Input: The tool reads your requirements.md file containing the project requirements.
  • Processing: The content is sent to the GPT-4o (or later) API, which processes and generates detailed ticket information.
  • Output: Tickets are output in Markdown format (or JSON if specified) and include comprehensive details:
    • Title and Description of the ticket
    • Dependencies for further work
    • Risk Assessments and potential issues
    • Pull Request (PR) Details for implementation
  • Automation: The command executes without prompting for further interaction, perfect for automated workflows.

Interactive Mode (Iterative Refinement)

To manually refine the ticket creation process, simply run:

uv run app.py
  • Direct Input: If no file is provided, you will be prompted to paste or type your requirements.
  • Feedback Guided: After initial ticket generation, you can review the output and provide feedback for refinements.
  • Repeat as Needed: Continue refining until you are completely satisfied with the tickets.

Docker Deployment

For containerized deployment, see docker.md which provides detailed instructions on building the Docker image, running the container, and managing environment variables securely.

Contributing

Contributions are welcome! Please reference the guidelines in .cursorrules for code style, testing, documentation, and security guidelines before contributing.

License

This project is licensed under the MIT License. Please see the LICENSE file for further details.

About

A CLI that takes a requirements document and automatically creates suitable JIRA tickets for you.

Topics

Resources

License

Stars

Watchers

Forks

Languages