Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 4.58 KB

File metadata and controls

55 lines (41 loc) · 4.58 KB

Jira board helpers

mozra wraps the Atlassian CLI (acli) so you can work with a single Jira board quickly. All commands read the board ID from board_id.txt and accept named options (no positional arguments).

Quick start

  1. Install acli from Atlassian and ensure it is on your PATH.
  2. Copy the example config files and fill in your values:
    cp site.txt.example site.txt      # your-site.atlassian.net
    cp email.txt.example email.txt    # Atlassian account email
    cp board_id.txt.example board_id.txt  # numeric board ID
    cp project.txt.example project.txt    # optional default project key
    # token.txt already exists; ensure it contains your API token
    Alternatively, export ACLI_SITE, ACLI_EMAIL, ACLI_TOKEN, and/or ACLI_PROJECT environment variables to override the files.
  3. The first script run will try acli jira auth status and, if needed, will log in again using the site/email/token. After that, the cached ACLI profile is reused.
  4. When a script needs your editor (e.g., editing a description) it writes the text to a secure OS temp file, launches $EDITOR, then deletes the file right after the change is sent to Jira. If a run is interrupted, manually remove any leftover temp files since they may contain sensitive data.
  5. Append --debug (or set ACLI_HELPERS_DEBUG=1) to print the underlying Jira REST calls and ACLI invocations for troubleshooting.

Note: The scripts also call Jira's Agile API directly to discover the board configuration (columns, filter JQL, default project). This requires the same site/email/token values so they are required even if ACLI is already authenticated.

Commands

Run everything through ./mozra <subcommand> [options]:

Command Purpose
./mozra mine [--limit N] [--all] [--include-done] List issues on the board assigned to you, including URLs and IDs.
./mozra view --issue KEY-123 Show status, type, priority, summary, description, and link for an issue.
./mozra columns Display every board column and the statuses mapped to it.
./mozra column-issues --name "In Progress" [--limit N | --all] List issues currently in a particular column or status.
./mozra create [--project KEY] [--type Task] [--assignee …] [--labels …] [--priority …] [--parent …] Launch $EDITOR via ACLI to create an issue (defaults to the board’s project or project.txt/ACLI_PROJECT).
./mozra edit-description --issue KEY-123 Pull the existing description into $EDITOR, then push the edited text back.
./mozra comment --issue KEY-123 [--edit-last] Open $EDITOR to add (or update) a comment on any issue.

Each command prints friendly error messages if config is missing or ACLI/Jira reject the request.

Tips

  • Use --all whenever you need to page through the entire backlog; otherwise the default limit (50) keeps things fast.
  • The helper module (jira_helpers.py) exposes utility functions if you want to add more scripts later.
  • If you prefer to keep secrets out of files, export the env vars (ACLI_SITE, ACLI_EMAIL, ACLI_TOKEN, ACLI_PROJECT) before running the scripts.
  • Editor scratch files now live in your system temp directory and are cleaned up automatically after each run.
  • --debug is available on every script and logs the API URLs plus ACLI commands being executed.

Testing

Use the bundled runner to install the dev tools in a local uv-managed virtualenv and execute the suite with coverage:

./run-tests.sh

Additional pytest arguments can be passed through (./run-tests.sh tests/test_mozra.py).