@@ -603,45 +603,109 @@ |
| 603 | 603 | </section> |
| 604 | 604 | {{ else if eq .Tab "checks" }} |
| 605 | 605 | {{ if .CheckGroups }} |
| 606 | | - <section class="shithub-pull-checks"> |
| 607 | | - {{ range .CheckGroups }} |
| 608 | | - <div class="shithub-pull-check-suite"> |
| 609 | | - <h3> |
| 610 | | - <span class="shithub-pull-check-app">{{ .Suite.AppSlug }}</span> |
| 611 | | - <span class="shithub-pull-check-suite-status shithub-pull-check-status-{{ printf "%s" .Suite.Status }}"> |
| 612 | | - {{ printf "%s" .Suite.Status }} |
| 613 | | - </span> |
| 614 | | - {{ if .Suite.Conclusion.Valid }} |
| 615 | | - <span class="shithub-pull-check-conclusion shithub-pull-check-conclusion-{{ printf "%s" .Suite.Conclusion.CheckConclusion }}"> |
| 616 | | - {{ printf "%s" .Suite.Conclusion.CheckConclusion }} |
| 617 | | - </span> |
| 606 | + <section class="shithub-checks-page"> |
| 607 | + <aside class="shithub-checks-sidebar" aria-label="Check runs"> |
| 608 | + <a href="#checks-summary" class="shithub-checks-sidebar-item is-active">{{ octicon "home" }} Summary</a> |
| 609 | + <div class="shithub-checks-sidebar-group"> |
| 610 | + <div class="shithub-checks-sidebar-heading">All jobs</div> |
| 611 | + {{ range .CheckGroups }} |
| 612 | + {{ range .Runs }} |
| 613 | + <a href="#check-run-{{ .R.ID }}" class="shithub-checks-sidebar-item"> |
| 614 | + {{ if .R.Conclusion.Valid }} |
| 615 | + {{ if eq (printf "%s" .R.Conclusion.CheckConclusion) "success" }}<span class="shithub-pull-check-status-completed">●</span>{{ else }}<span class="shithub-pull-check-conclusion-failure">●</span>{{ end }} |
| 616 | + {{ else }} |
| 617 | + <span class="shithub-pull-check-status-{{ printf "%s" .R.Status }}">●</span> |
| 618 | + {{ end }} |
| 619 | + <span>{{ .R.Name }}</span> |
| 620 | + </a> |
| 621 | + {{ end }} |
| 618 | 622 | {{ end }} |
| 619 | | - </h3> |
| 620 | | - <ul class="shithub-pull-check-runs"> |
| 621 | | - {{ range .Runs }} |
| 622 | | - <li class="shithub-pull-check-run"> |
| 623 | | - <span class="shithub-pull-check-status shithub-pull-check-status-{{ printf "%s" .R.Status }}">●</span> |
| 624 | | - <strong>{{ .R.Name }}</strong> |
| 625 | | - {{ if .R.Conclusion.Valid }} |
| 626 | | - <span class="shithub-pull-check-conclusion shithub-pull-check-conclusion-{{ printf "%s" .R.Conclusion.CheckConclusion }}"> |
| 627 | | - {{ printf "%s" .R.Conclusion.CheckConclusion }} |
| 623 | + </div> |
| 624 | + <div class="shithub-checks-sidebar-group"> |
| 625 | + <div class="shithub-checks-sidebar-heading">Run details</div> |
| 626 | + <span class="shithub-checks-sidebar-item">{{ octicon "pulse" }} Usage</span> |
| 627 | + <span class="shithub-checks-sidebar-item">{{ octicon "file" }} Workflow file</span> |
| 628 | + </div> |
| 629 | + </aside> |
| 630 | + |
| 631 | + <div class="shithub-checks-main"> |
| 632 | + <section id="checks-summary" class="shithub-checks-summary-card"> |
| 633 | + <div> |
| 634 | + <span class="shithub-muted">Triggered via pull request</span> |
| 635 | + <strong> |
| 636 | + {{ if .AuthorName }}<a href="/{{ .AuthorName }}">{{ .AuthorName }}</a>{{ end }} |
| 637 | + opened #{{ .PR.INumber }} |
| 638 | + </strong> |
| 639 | + <a class="shithub-branch-name" href="/{{ .Owner }}/{{ .Repo.Name }}/tree/{{ .PR.HeadRef }}">{{ .PR.HeadRef }}</a> |
| 640 | + </div> |
| 641 | + <div> |
| 642 | + <span class="shithub-muted">Status</span> |
| 643 | + {{ if eq .PullStats.CheckState "success" }}<strong class="shithub-checks-success">Success</strong> |
| 644 | + {{ else if eq .PullStats.CheckState "failure" }}<strong class="shithub-checks-failure">Failure</strong> |
| 645 | + {{ else }}<strong class="shithub-checks-pending">In progress</strong>{{ end }} |
| 646 | + </div> |
| 647 | + <div> |
| 648 | + <span class="shithub-muted">Total checks</span> |
| 649 | + <strong>{{ .PullStats.Checks }}</strong> |
| 650 | + </div> |
| 651 | + <div> |
| 652 | + <span class="shithub-muted">Artifacts</span> |
| 653 | + <strong>—</strong> |
| 654 | + </div> |
| 655 | + </section> |
| 656 | + |
| 657 | + {{ range .CheckGroups }} |
| 658 | + <section class="shithub-checks-workflow"> |
| 659 | + <header> |
| 660 | + <div> |
| 661 | + <h2>{{ .Suite.AppSlug }}</h2> |
| 662 | + <p class="shithub-muted">on: pull_request</p> |
| 663 | + </div> |
| 664 | + <span class="shithub-pull-check-suite-status shithub-pull-check-status-{{ printf "%s" .Suite.Status }}"> |
| 665 | + {{ printf "%s" .Suite.Status }} |
| 666 | + </span> |
| 667 | + </header> |
| 668 | + <div class="shithub-checks-workflow-map"> |
| 669 | + {{ range .Runs }} |
| 670 | + <article id="check-run-{{ .R.ID }}" class="shithub-checks-run-card"> |
| 671 | + <span class="shithub-checks-run-icon"> |
| 672 | + {{ if .R.Conclusion.Valid }} |
| 673 | + {{ if eq (printf "%s" .R.Conclusion.CheckConclusion) "success" }}{{ octicon "check-circle" }}{{ else }}{{ octicon "x-circle" }}{{ end }} |
| 674 | + {{ else }} |
| 675 | + {{ octicon "dot-fill" }} |
| 676 | + {{ end }} |
| 628 | 677 | </span> |
| 629 | | - {{ else }} |
| 630 | | - <span class="shithub-muted">{{ printf "%s" .R.Status }}</span> |
| 678 | + <div> |
| 679 | + <strong>{{ .R.Name }}</strong> |
| 680 | + <p class="shithub-muted"> |
| 681 | + {{ if .R.Conclusion.Valid }}{{ printf "%s" .R.Conclusion.CheckConclusion }}{{ else }}{{ printf "%s" .R.Status }}{{ end }} |
| 682 | + {{ if .R.CompletedAt.Valid }} · {{ relativeTime .R.CompletedAt.Time }}{{ end }} |
| 683 | + </p> |
| 684 | + </div> |
| 685 | + {{ if .R.DetailsUrl }}<a href="{{ .R.DetailsUrl }}" rel="noopener noreferrer">details</a>{{ end }} |
| 686 | + </article> |
| 631 | 687 | {{ end }} |
| 632 | | - {{ if .R.CompletedAt.Valid }}<small><time datetime="{{ .R.CompletedAt.Time.Format "2006-01-02T15:04:05Z" }}">{{ relativeTime .R.CompletedAt.Time }}</time></small>{{ end }} |
| 633 | | - {{ if .R.DetailsUrl }}<a href="{{ .R.DetailsUrl }}" rel="noopener noreferrer">details</a>{{ end }} |
| 634 | | - {{ if .SummaryHTML }} |
| 635 | | - <details> |
| 636 | | - <summary class="shithub-muted">summary</summary> |
| 637 | | - <div class="markdown-body">{{ .SummaryHTML }}</div> |
| 638 | | - </details> |
| 688 | + </div> |
| 689 | + </section> |
| 690 | + {{ end }} |
| 691 | + |
| 692 | + <section class="shithub-checks-annotations"> |
| 693 | + <h2>Annotations</h2> |
| 694 | + {{ range .CheckGroups }} |
| 695 | + {{ range .Runs }} |
| 696 | + {{ if .SummaryHTML }} |
| 697 | + <details class="shithub-checks-annotation" open> |
| 698 | + <summary> |
| 699 | + <strong>{{ .R.Name }}</strong> |
| 700 | + {{ if .R.Conclusion.Valid }}<span>{{ printf "%s" .R.Conclusion.CheckConclusion }}</span>{{ else }}<span>{{ printf "%s" .R.Status }}</span>{{ end }} |
| 701 | + </summary> |
| 702 | + <div class="markdown-body">{{ .SummaryHTML }}</div> |
| 703 | + </details> |
| 704 | + {{ end }} |
| 639 | 705 | {{ end }} |
| 640 | | - </li> |
| 641 | 706 | {{ end }} |
| 642 | | - </ul> |
| 707 | + </section> |
| 643 | 708 | </div> |
| 644 | | - {{ end }} |
| 645 | 709 | </section> |
| 646 | 710 | {{ else }} |
| 647 | 711 | <p class="shithub-muted">No checks have reported on <code>{{ slice .PR.HeadOid 0 7 }}</code>. Post via <code>POST /api/v1/repos/{{ .Owner }}/{{ .Repo.Name }}/check-runs</code>.</p> |