python_examples/cli/get_issues.py

21 lines
605 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from jira import JIRA
from rich.console import Console
from jql_utils import JQLPrompt, load_config
config = load_config()
console = Console(color_system="truecolor")
jira = JIRA(server=config["server"], basic_auth=(config["username"], config["token"]))
jql_prompt = JQLPrompt(jira)
issues = jql_prompt.prompt()
console.print("[] Getting more issues... 🚀", style="#A3BE8C bold")
more_issues = jql_prompt.multi_prompt()
if issues or more_issues:
console.print("[] Saving logs... 🚀", style="#A3BE8C bold")
jql_prompt.save_log()
console.print("Exiting... 🚀", style="bold green")