|
5 | 5 | / exist to keep it that width, not for any rule about the data itself |
6 | 6 | - failed_cap = 10 |
7 | 7 | - conflicts_cap = 5 |
8 | | -details.sidebar-section.ci-thread-section.ci-badges open=true |
9 | | - summary.sidebar-heading CI |
10 | | - .sidebar-section |
11 | | - .ci-thread-row |
12 | | - span.ci-thread-label Applies |
13 | | - span.ci-thread-value |
14 | | - = ci_bucket_badge(row.health_bucket) |
15 | | - - if (behind = ci_behind_label(row.behind_days(status.repo_state))) |
16 | | - span.muted = "#{behind} behind master" |
17 | | - - if (frozen_note = ci_frozen_note(row)) |
18 | | - .ci-thread-note.muted = frozen_note |
19 | | - - if row.status == "failed" |
20 | | - .ci-thread-note = ci_patchset_outcome(row) |
21 | | - - if row.conflict_files.any? |
22 | | - - conflicts = row.conflict_files |
23 | | - .ci-thread-note.muted |
24 | | - = "conflicts: #{conflicts.first(conflicts_cap).join(', ')}" |
25 | | - - if conflicts.size > conflicts_cap |
26 | | - = " +#{conflicts.size - conflicts_cap} more" |
27 | | - .ci-thread-row |
28 | | - span.ci-thread-label Build |
29 | | - span.ci-thread-value |
30 | | - - if row.ci_status.present? |
31 | | - = ci_status_badge(row.ci_status, title: ci_skip_reason_for(row)) |
32 | | - - else |
33 | | - = ci_muted_dash |
34 | | - - if run |
35 | | - = ci_duration_pair(run) |
36 | | - - if run&.tests_total |
37 | | - .ci-thread-row |
38 | | - span.ci-thread-label Tests |
39 | | - span.ci-thread-value = ci_tests_figure(run, hover: false) |
40 | | - - if failed.any? |
41 | | - ul.ci-thread-failed |
42 | | - - failed.first(failed_cap).each do |name| |
43 | | - li = name |
44 | | - - if failed.size > failed_cap |
45 | | - .ci-thread-note.muted = "+#{failed.size - failed_cap} more" |
46 | | - .ci-thread-links |
47 | | - - if run |
48 | | - = link_to "GitHub run", ci_github_run_url(run), target: "_blank", rel: "noopener" |
49 | | - - if row.pushed_at |
50 | | - = link_to "GitHub branch", ci_github_branch_url(row.branch_name), target: "_blank", rel: "noopener" |
51 | | - = link_to "CI history", ci_topic_path(topic) |
| 8 | +.ci-thread-row |
| 9 | + span.ci-thread-label Applies |
| 10 | + span.ci-thread-value |
| 11 | + = ci_bucket_badge(row.health_bucket) |
| 12 | + - if (behind = ci_behind_label(row.behind_days(status.repo_state))) |
| 13 | + span.muted = "#{behind} behind master" |
| 14 | +- if (frozen_note = ci_frozen_note(row)) |
| 15 | + .ci-thread-note.muted = frozen_note |
| 16 | +- if row.status == "failed" |
| 17 | + .ci-thread-note = ci_patchset_outcome(row) |
| 18 | + - if row.conflict_files.any? |
| 19 | + - conflicts = row.conflict_files |
| 20 | + .ci-thread-note.muted |
| 21 | + = "conflicts: #{conflicts.first(conflicts_cap).join(', ')}" |
| 22 | + - if conflicts.size > conflicts_cap |
| 23 | + = " +#{conflicts.size - conflicts_cap} more" |
| 24 | +.ci-thread-row |
| 25 | + span.ci-thread-label Build |
| 26 | + span.ci-thread-value |
| 27 | + - if row.ci_status.present? |
| 28 | + = ci_status_badge(row.ci_status, title: ci_skip_reason_for(row)) |
| 29 | + - else |
| 30 | + = ci_muted_dash |
| 31 | + - if run |
| 32 | + = ci_duration_pair(run) |
| 33 | +- if run&.tests_total |
| 34 | + .ci-thread-row |
| 35 | + span.ci-thread-label Tests |
| 36 | + span.ci-thread-value = ci_tests_figure(run, hover: false) |
| 37 | + - if failed.any? |
| 38 | + ul.ci-thread-failed |
| 39 | + - failed.first(failed_cap).each do |name| |
| 40 | + li = name |
| 41 | + - if failed.size > failed_cap |
| 42 | + .ci-thread-note.muted = "+#{failed.size - failed_cap} more" |
| 43 | +- if run || row.pushed_at |
| 44 | + .ci-thread-links |
| 45 | + - if run |
| 46 | + = link_to "GitHub run", ci_github_run_url(run), target: "_blank", rel: "noopener" |
| 47 | + - if row.pushed_at |
| 48 | + = link_to "GitHub branch", ci_github_branch_url(row.branch_name), target: "_blank", rel: "noopener" |
0 commit comments