<commit_before><%
#--
#   Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
#   Copyright (C) 2008 <NAME> <<EMAIL>>
#   Copyright (C) 2008 <NAME> <<EMAIL>>
#   Copyright (C) 2009 <NAME> <<EMAIL>>
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero General Public License for more details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#++
%>

<% @page_title = t("views.merges.page_title", :repo => h(@repository.name)) -%>
<%= breadcrumbs_from(@root) -%>

<div id="merge-requests-status-chooser" class="round-10">
  <h5 class="hint">Filter by status:</h5>
  <%= render_status_tag_list(@status_tags, @repository) -%>
</div>

<h1><%= t("views.merges.page_title", :repo => h(@repository.name)) %></h1>

<p class="hint"><%= t("views.merges.hint") %></p>

<div class="clear"></div>
<table class="listing">
  <thead>
    <th>ID</th>
    <th>Status</th>
    <th>Summary</th>
    <th>Creator</th>
    <th>Age</th>
  </thead>
  <tbody>
  <% if @open_merge_requests.blank? -%>
    <p>
      <em><%= t("views.merges.no_merge") %></em>
    </p>
  <% end -%>
  <% @open_merge_requests.each do |merge_request| -%>
    <% mr_path = repo_owner_path(merge_request.target_repository, 
         [ merge_request.source_repository.project, 
           merge_request.target_repository, 
           merge_request ]) -%>
    <tr class="<%= cycle('even', 'odd') -%>" id="<%= dom_id(merge_request) -%>">
      <td><%= link_to "#"+h(merge_request.to_param), mr_path -%></td>
    <% if merge_request.status_tag -%>
      <td style="color:<%=h merge_request.status_tag.color -%>">
        <%=h merge_request.status_tag.name -%>
      </td>
    <% else -%>
      <td><%=h merge_request.status_tag -%></td>
    <% end -%>
      <td>
        <%= link_to h(truncate(merge_request.summary, :length=>110)), mr_path -%>
      </td>
      <td><%= link_to(h(merge_request.user.login), merge_request.user) -%></td>
      <td><%=h time_ago_in_words(merge_request.created_at.to_s) -%></td>
    </tr>
  <% end -%>
  </tbody>
</table>

<%= will_paginate @open_merge_requests %><commit_msg>Show the target branch in the merge_requests#index listing<commit_after><%
#--
#   Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
#   Copyright (C) 2008 <NAME> <<EMAIL>>
#   Copyright (C) 2008 <NAME> <<EMAIL>>
#   Copyright (C) 2009 <NAME> <<EMAIL>>
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero General Public License for more details.
#
#   You should have received a copy of the GNU Affero General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#++
%>

<% @page_title = t("views.merges.page_title", :repo => h(@repository.name)) -%>
<%= breadcrumbs_from(@root) -%>

<div id="merge-requests-status-chooser" class="round-10">
  <h5 class="hint">Filter by status:</h5>
  <%= render_status_tag_list(@status_tags, @repository) -%>
</div>

<h1><%= t("views.merges.page_title", :repo => h(@repository.name)) %></h1>

<p class="hint"><%= t("views.merges.hint") %></p>

<div class="clear"></div>
<table class="listing">
  <thead>
    <th>ID</th>
    <th>Status</th>
    <th>Summary</th>
    <th>Target branch</th>
    <th>Creator</th>
    <th>Age</th>
  </thead>
  <tbody>
  <% if @open_merge_requests.blank? -%>
    <p>
      <em><%= t("views.merges.no_merge") %></em>
    </p>
  <% end -%>
  <% @open_merge_requests.each do |merge_request| -%>
    <% mr_path = repo_owner_path(merge_request.target_repository, 
         [ merge_request.source_repository.project, 
           merge_request.target_repository, 
           merge_request ]) -%>
    <tr class="<%= cycle('even', 'odd') -%>" id="<%= dom_id(merge_request) -%>">
      <td><%= link_to "#"+h(merge_request.to_param), mr_path -%></td>
    <% if merge_request.status_tag -%>
      <td style="color:<%=h merge_request.status_tag.color -%>">
        <%=h merge_request.status_tag.name -%>
      </td>
    <% else -%>
      <td><%=h merge_request.status_tag -%></td>
    <% end -%>
      <td>
        <%= link_to h(truncate(merge_request.summary, :length=>110)), mr_path -%>
      </td>
      <td><%=h merge_request.target_branch -%></td>
      <td><%= link_to(h(merge_request.user.login), merge_request.user) -%></td>
      <td><%=h time_ago_in_words(merge_request.created_at.to_s) -%></td>
    </tr>
  <% end -%>
  </tbody>
</table>

<%= will_paginate @open_merge_requests %>
{'fraction_non_alphanumeric': 0.18075911311537016, 'fraction_numerical': 0.00977076287110109, 'mean_word_length': 3.491983122362869, 'pattern_counts': {'":': 0, '<': 166, '<?xml version=': 0, '>': 172, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '511674', 'n_tokens_mistral': 1983, 'n_tokens_neox': 1870, 'n_words': 454}