Skip to content

Commit

Permalink
Corrected row striping for repository branch protection rules table
Browse files Browse the repository at this point in the history
  • Loading branch information
johntopleyons committed Sep 5, 2024
1 parent 24786e1 commit e476e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webapp/views/repository.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</thead>
<tbody>
<% repo.branch_protection_rules.nodes.sort_by(&:pattern).each_with_index do |rule, i| %>
<tr class="<%= i.even? ? 'even' : 'odd' %>">
<tr class="<%= i.even? ? 'odd' : 'even' %>"> <%# This looks wrong but isn't. %>
<td><% if repo.default_branch_ref.name.eql?(rule.pattern) %><strong><% end %><%=h rule.pattern %><% if repo.default_branch_ref.name.eql?(rule.pattern) %></strong><% end %></td>
<td><% if rule.required_approving_review_count.nil? %>0<% else %><%= rule.required_approving_review_count %><% end %></td>
<td><% if rule.dismisses_stale_reviews %><img src="/svg/tick.svg" alt="Tick"><% else %><img src="/svg/cross.svg" alt="Cross"><% end %></td>
Expand All @@ -103,7 +103,7 @@
</thead>
<tbody>
<% repo.branch_protection_rules.nodes.sort_by(&:pattern).each_with_index do |rule, i| %>
<tr class="<%= i.even? ? 'even' : 'odd' %>">
<tr class="<%= i.even? ? 'odd' : 'even' %>"> <%# This looks wrong but isn't. %>
<td><% if repo.default_branch_ref.name.eql?(rule.pattern) %><strong><% end %><%=h rule.pattern %><% if repo.default_branch_ref.name.eql?(rule.pattern) %></strong><% end %></td>
<td><% if rule.requires_commit_signatures %><img src="/svg/tick.svg" alt="Tick"><% else %><img src="/svg/cross.svg" alt="Cross"><% end %></td>
<td><% if rule.requires_linear_history %><img src="/svg/tick.svg" alt="Tick"><% else %><img src="/svg/cross.svg" alt="Cross"><% end %></td>
Expand Down

0 comments on commit e476e91

Please sign in to comment.