<commit_before>module Travis
  module Github
    module Services
      class FindOrCreateRepo < Travis::Services::Base
        register :github_find_or_create_repo

        def run
          repo = find || create
          repo.update_attributes(params)
          repo
        end

        private

          def find
            run_service(:find_repo, params)
          end

          def create
            Repository.create!(:owner_name => params[:owner_name], :name => params[:name])
          end
      end<commit_msg>Use only relevant params when searching for repo<commit_after>module Travis
  module Github
    module Services
      class FindOrCreateRepo < Travis::Services::Base
        register :github_find_or_create_repo

        def run
          repo = find || create
          repo.update_attributes(params)
          repo
        end

        private

          def find
            run_service(:find_repo, :owner_name => params[:owner_name], :name => params[:name])
          end

          def create
            Repository.create!(:owner_name => params[:owner_name], :name => params[:name])
          end
      end
{'fraction_non_alphanumeric': 0.07488986784140969, 'fraction_numerical': 0.0, 'mean_word_length': 1.9354005167958657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6195668', 'n_tokens_mistral': 294, 'n_tokens_neox': 281, 'n_words': 75}