<commit_before>require 'git'

module Bumpversion
  class GitOperation
    def initialize(options)
      @options = options
      @git = Git.init
      Git.init('.')
    end

    def config!
      @git.config('user.name', @options[:git_user])
      @git.config('user.email', @options[:git_email])
    end

    def commit!
      if @options[:git_commit]
        file = @options[:file].split(',') + [@options[:config_file]]
        file += @options[:git_extra_add].split(',') if @options[:git_extra_add]
        @git.add(file)
        @git.commit("Bump version: #{@options[:current_version]} → #{@options[:new_version]}")
      end
    end

    def tag!
      @git.add_tag("v#{@options[:new_version]}") if @options[:git_tag]
    end

    def push!
      @git.push if @options[:git_push]
      @git.push(@git.remote.name, @git.branch.name, :tags => true) if @options[:git_push] && @options[:git_tag]
    end

    def do!
      config!
      commit!
      tag!
      push!
    end
  end
end
<commit_msg>Commit with Author<commit_after>require 'git'

module Bumpversion
  class GitOperation
    def initialize(options)
      @options = options
      @git = Git.init
      Git.init('.')
    end

    def commit!
      if @options[:git_commit]
        file = @options[:file].split(',') + [@options[:config_file]]
        file += @options[:git_extra_add].split(',') if @options[:git_extra_add]
        @git.add(file)
        @git.commit("Bump version: #{@options[:current_version]} → #{@options[:new_version]}", {author: "#{@options[:git_user]} <#{@options[:git_email]}>"})
      end
    end

    def tag!
      @git.add_tag("v#{@options[:new_version]}") if @options[:git_tag]
    end

    def push!
      @git.push if @options[:git_push]
      @git.push(@git.remote.name, @git.branch.name, :tags => true) if @options[:git_push] && @options[:git_tag]
    end

    def do!
      commit!
      tag!
      push!
    end
  end
end

{'fraction_non_alphanumeric': 0.1678832116788321, 'fraction_numerical': 0.0, 'mean_word_length': 2.8303393213572856, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '3691502', 'n_tokens_mistral': 656, 'n_tokens_neox': 649, 'n_words': 133}