Skip to main content

Collection of Python scripts for interacting with Jira tickets.

Project description

jps-jira-utils

Build & Test Publish to PyPI codecov Python Version License: MIT

A clean, modular, production-grade toolkit for Jira power users
Built with Typer, rich logging, and full test coverage.

Features

  • add_comment.py — Add rich comments (with optional file attachments) to any Jira issue
    • Interactive multiline input (ends on two blank lines)
    • Load comment from file (--comment-file)
    • Attach files with pre-canned or custom notes (STDOUT, STDERR, log file, README, etc.)
    • Final confirmation table before posting
    • Full logging with structured output
  • Secure credential loading via ~/.jira.env (never in code or CLI)
  • Clean, maintainable, fully tested codebase using modern Python best practices
  • Zero external runtime dependencies beyond requests, typer, and python-dotenv

Installation

From source (recommended for development)

git clone https://github.com/jai-python3/jps-jira-utils.git
cd jps-jira-utils
make install    # creates .venv and installs in editable mode

From PyPI (coming soon)

pip install jps-jira-utils

Prerequisites

Create a ~/.jira.env file with your Jira Cloud credentials:

JIRA_BASE_URL=https://your-company.atlassian.net
JIRA_EMAIL=your.email@company.com
JIRA_API_TOKEN=your_api_token_here

Generate your API token at: https://id.atlassian.com/manage-profile/security/api-tokens

Usage

Add a comment interactively

jps-add-comment JPS-1234

Add a comment from a file + attach a log

jps-add-comment JPS-1234 \
  --comment-file results.txt \
  --attach-file test-run.log

Full help

jps-add-comment --help

Development

# Format, lint, and fix everything
make fix
make format
make lint

Run tests with coverage

make test

Run pre-commit hooks (recommended)

pre-commit run --all-files

Project Structure

src/jps_jira_utils/
├── add_comment.py        # Typer CLI entrypoint
├── jira_helper.py        # Credential loading
├── logging_helper.py     # Structured logging setup
└── prompt_helper.py      # Interactive input utilities

tests/                    # Includes coverage, darglint-compliant

Contributing

Contributions are welcome! Please:

Use pre-commit hooks Write tests for new features Follow Google-style docstrings Keep the codebase clean and modular

License

MIT License © Jaideep Sundaram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jps_jira_utils-0.3.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jps_jira_utils-0.3.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file jps_jira_utils-0.3.0.tar.gz.

File metadata

  • Download URL: jps_jira_utils-0.3.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for jps_jira_utils-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c3c6f77e244d8a06699ba2e7147e016adcdf77d473125519319b76254e04e9b6
MD5 a5f08987c3e0e5e9b9b69ff1d65a7a3a
BLAKE2b-256 f7dbfdeb575857a4eea28c7e612e63f20680c9dda9c3714c9967f396e0b0f917

See more details on using hashes here.

File details

Details for the file jps_jira_utils-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: jps_jira_utils-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for jps_jira_utils-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7a43e35c7449dd8f3f48c113e68c69216310984cc15d0a490d9964348150d82
MD5 00434598a0ce1ced4bf6e4a300aaaa79
BLAKE2b-256 054a14122b44b934d75463b718b0a16ad08ad87dd5df33fe463ae90f4cea8401

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page