Metadata-Version: 2.4
Name: pyjiraskill
Version: 0.1.2
Summary: CLI wrapper for Jira Cloud
License: MIT License
        
        Copyright (c) 2024
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jira>=3.10.5
Requires-Dist: rich>=13.7.1
Requires-Dist: typer>=0.12.0
Dynamic: license-file

# pyjiraskill

A small Jira Cloud CLI wrapper built on top of the `jira` Python library.

## Installation

```bash
uv sync
```

## uv quickstart

```bash
uv sync
uv run pyjiraskill --help
```

## Environment variables

Set the Jira Cloud credentials in your shell:

```bash
export JIRA_URL="https://your-domain.atlassian.net"
export JIRA_EMAIL="you@example.com"
export JIRA_API_TOKEN="your-api-token"
```

Notes on Jira Cloud auth:
- Jira Cloud uses an API token with your Atlassian email address.
- Create a token at https://id.atlassian.com/manage-profile/security/api-tokens.
- Some Jira Cloud instances require accountId for assignment; email may not work.

Optional field discovery overrides:

```bash
export JIRA_FIELD_DISCOVERY_ISSUE="AV-1"
export JIRA_SPRINT_FIELD="customfield_10020"
export JIRA_STORY_POINTS_FIELD="customfield_10016"
export JIRA_RANK_FIELD="customfield_10019"
```

## Commands

Add `--json` to any command to output machine-readable JSON.

List open issues in a project:

```bash
uv run pyjiraskill issues list --project ABC
```

List open issues with JSON output and extra fields:

```bash
uv run pyjiraskill issues list --project ABC --fields priority --fields labels --json
```

List open epics in a project:

```bash
uv run pyjiraskill epics list --project ABC
```

List open issues in an epic:

```bash
uv run pyjiraskill epic issues --epic ABC-123
```

Swap rank between an epic and another issue:

```bash
uv run pyjiraskill epic swap-rank --epic ABC-123 --with XYZ-7
```

List open issues in a sprint:

```bash
uv run pyjiraskill sprint issues --sprint 456
```

List all sprints in a project:

```bash
uv run pyjiraskill sprint list --project ABC
```

Filter sprint list by state:

```bash
uv run pyjiraskill sprint list --project ABC --state active
```

Get the current sprint for a project:

```bash
uv run pyjiraskill sprint current --project ABC
```

If your project has multiple boards, pass a board ID explicitly:

```bash
uv run pyjiraskill sprint current --project ABC --board 123
```

List open issues in the current sprint:

```bash
uv run pyjiraskill sprint current-issues --project ABC
```

Sprint IDs are numeric. You can usually find them in Jira board URLs that include
`?sprint=123` or in the sprint report page.

Create an issue:

```bash
uv run pyjiraskill issue add --project ABC --summary "Fix login bug" \
  --description "Details about the failure" --issuetype Task --parent ABC-1 --labels bug,urgent
```

Transition an issue:

```bash
uv run pyjiraskill issue transition --key ABC-123 --to "In Progress"
```

Move an issue to another sprint:

```bash
uv run pyjiraskill issue move-sprint --key ABC-123 --from-sprint 10 --to-sprint 12
```

Add a comment to an issue:

```bash
uv run pyjiraskill issue comment --key ABC-123 --text "Looking into this now."
```

List open issues assigned to a user:

```bash
uv run pyjiraskill issues assigned --user "user@example.com"
```

## Development

Run tests with coverage:

```bash
uv run pytest
```

Run lint checks:

```bash
uv run ruff check .
```
