Skip to content

main

generate(jql_query=typer.Argument(help='JQL query to search for issues'), fields=typer.Argument('Summary, Release Notes', help='Comma separated list of fields to include in the release notes', show_default=True), convert_to_markdown=typer.Option(True, help='Convert HTML to Markdown', show_default=True), output_dir=typer.Argument('dist', help='Output directory', show_default=True), template_file=typer.Argument('./template.md.jinja', help='Template file to use', show_default=True), config_file=typer.Argument(None, help='Path to JSON configuration file', show_default=False))

Generate release notes

Source code in src/rich_jira_release_notes/main.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@app.command()
def generate(
    jql_query: str = typer.Argument(help="JQL query to search for issues"),
    fields: str = typer.Argument(
        "Summary, Release Notes",
        help="Comma separated list of fields to include in the release notes",
        show_default=True,
    ),
    convert_to_markdown: bool = typer.Option(
        True, help="Convert HTML to Markdown", show_default=True
    ),
    output_dir: str = typer.Argument(
        "dist", help="Output directory", show_default=True
    ),
    template_file: str = typer.Argument(
        "./template.md.jinja", help="Template file to use", show_default=True
    ),
    config_file: str = typer.Argument(
        None, help="Path to JSON configuration file", show_default=False
    ),
):
    """
    Generate release notes
    """
    if config_file:
        api = get_jira_api_from_json(config_file)
    else:
        api = get_jira_api_from_env()

    generate_release_notes(
        api,
        jql_query,
        [field.strip() for field in fields.split(",")],
        convert_to_markdown,
        output_dir,
        template_file,
    )