<commit_before>module Projects
  class UpdateService < BaseService
    include UpdateVisibilityLevel

    def execute
      unless valid_visibility_level_change?(project, params[:visibility_level])
        return error('New visibility level not allowed!')
      end

      if renaming_project_with_container_registry_tags?
        return error('Cannot rename project because it contains container registry tags!')
      end

      if changing_default_branch?
        return error("Could not set the default branch") unless project.change_head(params[:default_branch])
      end

      ensure_wiki_exists if enabling_wiki?<commit_msg>Yield to an optional block in Projects::UpdateService<commit_after>module Projects
  class UpdateService < BaseService
    include UpdateVisibilityLevel

    def execute
      unless valid_visibility_level_change?(project, params[:visibility_level])
        return error('New visibility level not allowed!')
      end

      if renaming_project_with_container_registry_tags?
        return error('Cannot rename project because it contains container registry tags!')
      end

      if changing_default_branch?
        return error("Could not set the default branch") unless project.change_head(params[:default_branch])
      end

      ensure_wiki_exists if enabling_wiki?

      yield if block_given?
{'fraction_non_alphanumeric': 0.05318352059925094, 'fraction_numerical': 0.0, 'mean_word_length': 3.8937728937728937, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1199393', 'n_tokens_mistral': 330, 'n_tokens_neox': 312, 'n_words': 102}