def examine_blueprint_working_branch(repo: BlueprintRepo, blueprint_name: str) -> None: if repo.is_repo_detached(): raise BadBlueprintRepo("Repo's HEAD is in detached state") if not repo.repo_has_blueprint(blueprint_name): logger.debug(f"Current repo does not contain a definition for the blueprint '{blueprint_name}'.") if repo.is_dirty(): logger.debug("You have uncommitted changes") if repo.untracked_files: logger.debug( "Untracked files detected - only staged or committed files will be used when testing local changes" ) if not repo.current_branch_exists_on_remote(): logger.debug("Your current local branch doesn't exist on remote") # raise BadBlueprintRepo("Your current local branch doesn't exist on remote") if not repo.is_current_branch_synced(): logger.debug("Your local branch is not synced with remote") return
def check_repo_for_errors(repo: BlueprintRepo) -> None: if repo.is_repo_detached(): logger.error("Repo's HEAD is in detached state") raise BadBlueprintRepo("Repo's HEAD is in detached state")