def main()

in src/autopr_caller.py [0:0]


def main():
    from test import test_utils

    dlc_images = test_utils.get_dlc_images()
    image_list = dlc_images.split(" ")
    if not image_list or all(
        ["autopatch" not in single_image_uri for single_image_uri in image_list]
    ):
        LOGGER.info(f"No appropriate image in image_list: {image_list}")
        return
    edited_files_data = generate_edited_files_data(
        image_list=image_list, folder=os.getenv("CODEBUILD_RESOLVED_SOURCE_VERSION", "temp")
    )
    ## TODO: Skip in case of no edited files
    common_image_specs = get_common_image_specs_for_all_images(image_list=image_list)
    branch_name_prefix = generate_branch_name_prefix(common_image_specs)
    pr_title = get_pr_title(common_image_specs)
    pr_body = get_pr_body()

    message_body_to_be_sent_to_autopr_queue = get_message_body_to_be_sent_to_autopr_queue(
        branch_name_prefix=branch_name_prefix,
        edited_files=edited_files_data,
        pr_body=pr_body,
        pr_title=pr_title,
        repo_owner="aws-dlinfra-bot",
        repo_name="deep-learning-containers",
        base_owner="aws",
    )
    LOGGER.info(f"Common Image Specs: {common_image_specs}")
    LOGGER.info(
        f"Message body to be sent to AutoPR Queue: {json.dumps(message_body_to_be_sent_to_autopr_queue)}"
    )