(context: Context)
Configures Bento to run in CI.
Configures Bento to run in CI.
Configures Bento to run in CI .
def install_ci(context: Context) -> None:
    """
    Configures Bento to run in CI.
    """
    _raise_if_unsupported(context.base_path)

    pretty_path = context.pretty_path(context.gh_actions_file_path)
    config_directory = pretty_path.parts[0]

    if not context.is_init:
        # confirmation was handled as part of init
        content.Install.banner.echo()

        if is_ci_configured(context):
            content.Overwrite.warn.echo(str(pretty_path).strip())

            is_overwrite_confirmed = content.Overwrite.confirm.echo()
            content.Overwrite.after_confirm.echo()
            if not is_overwrite_confirmed:
                sys.exit()

        on_done = content.Install.progress.echo(config_directory)

    _write_gh_actions_config(context.gh_actions_file_path, _get_user_email())

    if not context.is_init:
        on_done()

        content.Install.after_progress.echo()
        content.Install.finalize_ci.echo()
def install_ci ( context : Context ) -> None : _raise_if_unsupported ( context . base_path ) pretty_path = context . pretty_path ( context . gh_actions_file_path ) config_directory = pretty_path . parts [ 0 ] if not context . is_init : # confirmation was handled as part of init content . Install . banner . echo ( ) if is_ci_configured ( context ) : content . Overwrite . warn . echo ( str ( pretty_path ) . strip ( ) ) is_overwrite_confirmed = content . Overwrite . confirm . echo ( ) content . Overwrite . after_confirm . echo ( ) if not is_overwrite_confirmed : sys . exit ( ) on_done = content . Install . progress . echo ( config_directory ) _write_gh_actions_config ( context . gh_actions_file_path , _get_user_email ( ) ) if not context . is_init : on_done ( ) content . Install . after_progress . echo ( ) content . Install . finalize_ci . echo ( )