"""
Jira connection client.
"""

from jira import JIRA

from .config import settings


class JiraClientError(Exception):
    pass


def connect_jira(email: str, token: str) -> JIRA:
    """Create a Jira connection with the given credentials."""
    return JIRA(
        server=settings.jira_url,
        basic_auth=(email, token),
    )
