<commit_before>= content_for :title do
  = @build.ref[0, 7]
  &ndash;
  = @build.repository.name
= content_for :favicon do
  = favicon_link_tag image_path("#{@build.to_color}.png"), :type => 'image/png'

%h2.subheader
  = @build.repository.name
  &ndash;
  = link_to(@build.branch_record.name, repository_branch_path(@build.repository, @build.branch_record))
  &ndash;
  %code.build-status{class: @build.state, title: @build.ref}
    = @build.ref[0, 7]
  %a.info{:href => show_link_to_commit(@build.repository, @build.ref)}
    Show
  - if @build.branch_record.convergence?
    %a.info{:href => show_link_to_compare(@build, @build.previous_successful_build.try(:ref), @build.ref), :title => 'show changes since last green build'}
      Compare to last green build

  .actions
    - if @build.repository.allows_kochiku_merges?
      %form{action: toggle_merge_on_success_repository_build_path(@build.repository, @build), method: :post}
        %label
          = check_box_tag :merge_on_success, true, @build.merge_on_success_enabled?, disabled: !eligible_for_merge_on_success?(@build), onchange: 'this.form.submit()'
          Merge on Success

    %label
      = check_box_tag :refresh, true, @build.is_running?
      Refresh

.build-info.build-info-subheader
  - if @build.succeeded? && !@build.branch_record.convergence?
    %a.info{:href => show_link_to_create_pull_request(@build), :title => 'create a pull request against master'}
      Create pull request
  %span.info
    Created
    = timeago(@build.created_at)
  %span.info
    Updated
    = timeago(@build.updated_at)
  - if @build.completed?
    %span.info
      Built in #{duration_strftime(@build.elapsed_time, "%Hh %Mm %Ss")}
  - if @build.is_running?
    %span.info
      = button_to "Abort Build", abort_repository_build_path(@build.repository, @build), method: :patch, class: "abort-build"
  - if @repository.enabled? && (@build.failed? || @build.aborted?)
    %span.info
      - if @build.build_parts.empty? || !@build.error_details.empty?<commit_msg>add failed count to build header<commit_after>= content_for :title do
  = @build.ref[0, 7]
  &ndash;
  = @build.repository.name
= content_for :favicon do
  = favicon_link_tag image_path("#{@build.to_color}.png"), :type => 'image/png'

%h2.subheader
  = @build.repository.name
  &ndash;
  = link_to(@build.branch_record.name, repository_branch_path(@build.repository, @build.branch_record))
  &ndash;
  %code.build-status{class: @build.state, title: @build.ref}
    = @build.ref[0, 7]
  %a.info{:href => show_link_to_commit(@build.repository, @build.ref)}
    Show
  - if @build.branch_record.convergence?
    %a.info{:href => show_link_to_compare(@build, @build.previous_successful_build.try(:ref), @build.ref), :title => 'show changes since last green build'}
      Compare to last green build

  .actions
    - if @build.repository.allows_kochiku_merges?
      %form{action: toggle_merge_on_success_repository_build_path(@build.repository, @build), method: :post}
        %label
          = check_box_tag :merge_on_success, true, @build.merge_on_success_enabled?, disabled: !eligible_for_merge_on_success?(@build), onchange: 'this.form.submit()'
          Merge on Success

    %label
      = check_box_tag :refresh, true, @build.is_running?
      Refresh

.build-info.build-info-subheader
  - if @build.succeeded? && !@build.branch_record.convergence?
    %a.info{:href => show_link_to_create_pull_request(@build), :title => 'create a pull request against master'}
      Create pull request
  %span.info
    Created
    = timeago(@build.created_at)
  %span.info
    Updated
    = timeago(@build.updated_at)
  - if @build.completed?
    %span.info
      Built in #{duration_strftime(@build.elapsed_time, "%Hh %Mm %Ss")}
  - if @build.completed? && @build.failed? && @build.build_parts.present?
    %span.info
      #{@build.build_parts.failed.count} out of #{@build.build_parts.count} build parts failed
  - if @build.is_running?
    %span.info
      = button_to "Abort Build", abort_repository_build_path(@build.repository, @build), method: :patch, class: "abort-build"
  - if @repository.enabled? && (@build.failed? || @build.aborted?)
    %span.info
      - if @build.build_parts.empty? || !@build.error_details.empty?
{'fraction_non_alphanumeric': 0.14518029695969834, 'fraction_numerical': 0.0023568230025925053, 'mean_word_length': 4.113253012048193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6791411', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1448, 'n_words': 270}