flake8-jira-ticket-checker


Nameflake8-jira-ticket-checker JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/lauernik/flake8-jira-ticket-checker
SummaryFlake8 plugin to check JIRA ticket status
upload_time2025-09-01 12:44:46
maintainerNone
docs_urlNone
authorNikita Lauer
requires_python>=3.8
licenseMIT
keywords flake8 jira ticket checker linter
VCS
bugtrack_url
requirements flake8 jira
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JIRA Ticket Checker Plugin for Flake8

A Flake8 plugin for checking JIRA ticket status in your codebase.

## Features

- Find JIRA ticket links anywhere in code (not just in TODO comments)
- Check ticket status via JIRA API
- Authentication via environment variables
- Configurable timeout (default 1 second)
- Proper connection error handling

## Environment Variables

The plugin requires the following environment variables:

- `JIRA_USERNAME` - your JIRA username
- `JIRA_TOKEN` - JIRA API token (recommended)
- `JIRA_PASSWORD` - JIRA password (alternative to token, less secure)
- `JIRA_BASE_URL` - your JIRA server URL (e.g., `https://your-company.atlassian.net`)
- `JIRA_TIMEOUT` - connection timeout in seconds (optional, default: 1)

## Usage in CI

```bash
export JIRA_USERNAME="your.username@company.com"
export JIRA_TOKEN="your_api_token"
export JIRA_BASE_URL="https://your-company.atlassian.net"
export JIRA_TIMEOUT="3"  # Optional: 3 seconds timeout
flake8 --select=JTC path/to/your/code
```

## Configuration

You can also configure the plugin via `setup.cfg`:

```ini
[flake8]
jira_base_url = https://your-company.atlassian.net
jira_checker_silent = false
jira_timeout = 3
```

## Error Codes

- `JTC001` - JIRA ticket is in DONE/CLOSED/RESOLVED status and should be removed
- `JTC002` - JIRA ticket not found

## Supported Link Formats

The plugin finds links like:
- `https://your-company.atlassian.net/browse/PROJ-12345`
- `your-company.atlassian.net/browse/TEST-123`
- In comments, strings, URLs, etc.

## Ticket Status

Tickets are considered closed if their status is: DONE, CLOSED, RESOLVED

## Configuration Options

### Silent Mode

You can suppress warnings by setting:
- Environment variable: `JIRA_CHECKER_SILENT=true`
- In setup.cfg: `jira_checker_silent = true`

### Timeout

You can configure the JIRA API connection timeout:
- Environment variable: `JIRA_TIMEOUT=5` (in seconds)
- In setup.cfg: `jira_timeout = 5` (in seconds)
- Default: 1 second

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lauernik/flake8-jira-ticket-checker",
    "name": "flake8-jira-ticket-checker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "flake8, jira, ticket, checker, linter",
    "author": "Nikita Lauer",
    "author_email": "Nikita Lauer <lauernik@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/6c/01050d6cc8db74ecfe2a0b6cd446f0a54aa6da9aecc62da10763e39404bc/flake8_jira_ticket_checker-0.1.1.tar.gz",
    "platform": null,
    "description": "# JIRA Ticket Checker Plugin for Flake8\n\nA Flake8 plugin for checking JIRA ticket status in your codebase.\n\n## Features\n\n- Find JIRA ticket links anywhere in code (not just in TODO comments)\n- Check ticket status via JIRA API\n- Authentication via environment variables\n- Configurable timeout (default 1 second)\n- Proper connection error handling\n\n## Environment Variables\n\nThe plugin requires the following environment variables:\n\n- `JIRA_USERNAME` - your JIRA username\n- `JIRA_TOKEN` - JIRA API token (recommended)\n- `JIRA_PASSWORD` - JIRA password (alternative to token, less secure)\n- `JIRA_BASE_URL` - your JIRA server URL (e.g., `https://your-company.atlassian.net`)\n- `JIRA_TIMEOUT` - connection timeout in seconds (optional, default: 1)\n\n## Usage in CI\n\n```bash\nexport JIRA_USERNAME=\"your.username@company.com\"\nexport JIRA_TOKEN=\"your_api_token\"\nexport JIRA_BASE_URL=\"https://your-company.atlassian.net\"\nexport JIRA_TIMEOUT=\"3\"  # Optional: 3 seconds timeout\nflake8 --select=JTC path/to/your/code\n```\n\n## Configuration\n\nYou can also configure the plugin via `setup.cfg`:\n\n```ini\n[flake8]\njira_base_url = https://your-company.atlassian.net\njira_checker_silent = false\njira_timeout = 3\n```\n\n## Error Codes\n\n- `JTC001` - JIRA ticket is in DONE/CLOSED/RESOLVED status and should be removed\n- `JTC002` - JIRA ticket not found\n\n## Supported Link Formats\n\nThe plugin finds links like:\n- `https://your-company.atlassian.net/browse/PROJ-12345`\n- `your-company.atlassian.net/browse/TEST-123`\n- In comments, strings, URLs, etc.\n\n## Ticket Status\n\nTickets are considered closed if their status is: DONE, CLOSED, RESOLVED\n\n## Configuration Options\n\n### Silent Mode\n\nYou can suppress warnings by setting:\n- Environment variable: `JIRA_CHECKER_SILENT=true`\n- In setup.cfg: `jira_checker_silent = true`\n\n### Timeout\n\nYou can configure the JIRA API connection timeout:\n- Environment variable: `JIRA_TIMEOUT=5` (in seconds)\n- In setup.cfg: `jira_timeout = 5` (in seconds)\n- Default: 1 second\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Flake8 plugin to check JIRA ticket status",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/lauernik/flake8-jira-ticket-checker",
        "Issues": "https://github.com/lauernik/flake8-jira-ticket-checker/issues",
        "Repository": "https://github.com/lauernik/flake8-jira-ticket-checker"
    },
    "split_keywords": [
        "flake8",
        " jira",
        " ticket",
        " checker",
        " linter"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "318a164a36e04d7fc2344d8a14652548f44ad9fffe7ac5a446430c5c66dcbfd7",
                "md5": "ff4ba68b4c8d35a963c32d8ead967068",
                "sha256": "a1c29817109b02e7f98dae5ff6674b84f3b3cc794aeb435d1bbbdc1dbafc7ab6"
            },
            "downloads": -1,
            "filename": "flake8_jira_ticket_checker-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ff4ba68b4c8d35a963c32d8ead967068",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7551,
            "upload_time": "2025-09-01T12:44:44",
            "upload_time_iso_8601": "2025-09-01T12:44:44.825553Z",
            "url": "https://files.pythonhosted.org/packages/31/8a/164a36e04d7fc2344d8a14652548f44ad9fffe7ac5a446430c5c66dcbfd7/flake8_jira_ticket_checker-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "026c01050d6cc8db74ecfe2a0b6cd446f0a54aa6da9aecc62da10763e39404bc",
                "md5": "e397e579f517324f67749c0a330e3436",
                "sha256": "9d82192499b0d1d72c086db72c20289be62c9e66f809e3bd3d6c754cabb48f7a"
            },
            "downloads": -1,
            "filename": "flake8_jira_ticket_checker-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e397e579f517324f67749c0a330e3436",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7211,
            "upload_time": "2025-09-01T12:44:46",
            "upload_time_iso_8601": "2025-09-01T12:44:46.055469Z",
            "url": "https://files.pythonhosted.org/packages/02/6c/01050d6cc8db74ecfe2a0b6cd446f0a54aa6da9aecc62da10763e39404bc/flake8_jira_ticket_checker-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-01 12:44:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lauernik",
    "github_project": "flake8-jira-ticket-checker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "flake8",
            "specs": [
                [
                    ">=",
                    "6.0.0"
                ],
                [
                    "<",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "jira",
            "specs": [
                [
                    "<",
                    "4.0.0"
                ],
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        }
    ],
    "lcname": "flake8-jira-ticket-checker"
}
        
Elapsed time: 1.49541s