Sha256: d8872e30803996468df2eec70c6910255fe07c4f0f252858d1cac57982b1f2ac

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

<!--
  <%- @tables.each do |table| -%>
  <%= pluralize(table[:name], table[:count]) %><%= ": #{truncate(table[:content].first.message)}" if table[:count] > 0 %>
  <%- end -%>
  <%= pluralize("Markdown", @markdowns.size) %>
--!>
<%- @tables.each do |table| -%>
  <%- if table[:content].any? || table[:resolved].any? -%>
<table>
  <thead>
    <tr>
      <th width="50"></th>
      <th width="100%" data-danger-table="true" data-kind="<%= table[:name] %>">
        <%- if table[:count] > 0 -%>
          <%= pluralize(table[:name], table[:count]) %>
        <%- else -%>
          :white_check_mark: <%= random_compliment %>
        <%- end -%>
      </th>
     </tr>
  </thead>
  <tbody>
    <%- max_num_violations = FindMaxNumViolations.new(table[:content]).call -%>
    <%- table[:content].take(max_num_violations).each do |violation| -%>
    <tr>
      <td>:<%= table[:emoji] %>:</td>
      <td data-sticky="<%= violation.sticky %>"><%= violation.message %></td>
    </tr>
    <%- end -%>
    <%- if table[:content].length > max_num_violations -%>
      <tr>
        <td>:warning:</td>
        <td>
        Danger found <%= table[:content].length %> violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to <%= max_num_violations %>.
        </td>
      </tr>
    <%- end -%>
    <%- table[:resolved].each do |message| -%>
      <tr>
        <td>:white_check_mark:</td>
        <td data-sticky="true"><del><%= message %></del></td>
      </tr>
    <%- end -%>
  </tbody>
</table>
  <%- end -%>
<%- end -%>

<%- @markdowns.each do |current| -%>
<%= current %>
<%# the previous line has to be aligned far to the left, otherwise markdown can break easily %>
<%- end -%>
<p align="right" data-meta="generated_by_<%= @danger_id %>">
  Generated by :no_entry_sign: <a href="http://danger.systems/">danger</a>
</p>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danger-4.2.0 lib/danger/comment_generators/github.md.erb