|
23 | 23 | <!-- Header --> |
24 | 24 | <div class="triage-detail-header triage-detail-header-minimal"> |
25 | 25 | <div class="detail-title-row"> |
26 | | - <a href="https://github.com/@_review.Meta.Repo/pull/@_review.Meta.SkiaPrNumber" target="_blank" rel="noopener noreferrer" class="issue-link-lg">#@_review.Meta.SkiaPrNumber</a> |
27 | | - <h1>@(_indexEntry?.PrTitle ?? $"Skia Update: {FormatBranch(_review.Meta.OldUpstreamBranch)} → {FormatBranch(_review.Meta.UpstreamBranch)}")</h1> |
| 26 | + <a href="https://github.com/mono/skia/pull/@_review.Meta.PrNumber" target="_blank" rel="noopener noreferrer" class="issue-link-lg">#@_review.Meta.PrNumber</a> |
| 27 | + <h1>@(_review.Meta.PrTitle ?? _indexEntry?.PrTitle ?? $"Skia Update: {FormatBranch(_review.Meta.OldUpstreamBranch)} → {FormatBranch(_review.Meta.NewUpstreamBranch)}")</h1> |
28 | 28 | </div> |
29 | 29 | <div class="detail-header-meta"> |
30 | 30 | <span class="badge-risk badge-risk-@_review.RiskAssessment.ToString().ToLower()"> |
31 | 31 | @_review.RiskAssessment Risk |
32 | 32 | </span> |
33 | 33 | <span class="detail-meta-text"> |
34 | | - @FormatBranch(_review.Meta.OldUpstreamBranch) → @FormatBranch(_review.Meta.UpstreamBranch) |
35 | | - · Analyzed: @_review.Meta.AnalyzedAt.ToString("yyyy-MM-dd HH:mm UTC") |
36 | | - · <a href="https://github.com/@_review.Meta.Repo" target="_blank" rel="noopener noreferrer">@_review.Meta.Repo</a> |
| 34 | + @FormatBranch(_review.Meta.OldUpstreamBranch) → @FormatBranch(_review.Meta.NewUpstreamBranch) |
| 35 | + · Analyzed: @_review.Meta.Timestamp.ToString("yyyy-MM-dd HH:mm UTC") |
| 36 | + · <a href="https://github.com/mono/skia" target="_blank" rel="noopener noreferrer">mono/skia</a> |
37 | 37 | </span> |
38 | 38 | </div> |
39 | 39 | </div> |
|
71 | 71 | @(_review.DepsAudit.Status == SkiaReviewStatus.Pass ? "✓ PASS" : "⚠ REVIEW") |
72 | 72 | </span> |
73 | 73 | </div> |
74 | | - @if (_review.Meta.SkiasharpPrNumber is not null) |
| 74 | + @if (ParseCompanionPrNumber(_review.Meta.CompanionPr) is { } companionNum) |
75 | 75 | { |
76 | 76 | <div class="qf-group"> |
77 | 77 | <span class="qf-label">Companion</span> |
78 | | - <a href="https://github.com/mono/SkiaSharp/pull/@_review.Meta.SkiasharpPrNumber" target="_blank" rel="noopener noreferrer" class="label"> |
79 | | - SkiaSharp #@_review.Meta.SkiasharpPrNumber |
| 78 | + <a href="https://github.com/mono/SkiaSharp/pull/@companionNum" target="_blank" rel="noopener noreferrer" class="label"> |
| 79 | + SkiaSharp #@companionNum |
80 | 80 | </a> |
81 | 81 | </div> |
82 | 82 | } |
|
99 | 99 | <button type="button" class="content-tab @(_activeTab == "deps" ? "active" : "")" @onclick='() => _activeTab = "deps"'> |
100 | 100 | DEPS (@(_review.DepsAudit.Added.Count + _review.DepsAudit.Changed.Count)) |
101 | 101 | </button> |
102 | | - @if (_review.CompanionPr is not null) |
| 102 | + @if (_review.Meta.CompanionPr is not null) |
103 | 103 | { |
104 | 104 | <button type="button" class="content-tab @(_activeTab == "companion" ? "active" : "")" @onclick='() => _activeTab = "companion"'> |
105 | 105 | Companion PR |
|
133 | 133 |
|
134 | 134 | <p> |
135 | 135 | This review covers the Skia upstream merge from |
136 | | - <strong>@_review.Meta.OldUpstreamBranch</strong> to <strong>@_review.Meta.UpstreamBranch</strong>. |
| 136 | + <strong>@_review.Meta.OldUpstreamBranch</strong> to <strong>@_review.Meta.NewUpstreamBranch</strong>. |
137 | 137 | </p> |
138 | 138 |
|
139 | 139 | <div class="overview-grid"> |
|
201 | 201 |
|
202 | 202 | <h3 class="section-title">Commit SHAs</h3> |
203 | 203 | <div class="skia-shas"> |
204 | | - <span><strong>PR Head:</strong> <code>@Truncate(_review.Meta.Shas.PrHead)</code></span> |
205 | | - <span><strong>Base:</strong> <code>@Truncate(_review.Meta.Shas.Base)</code></span> |
206 | | - <span><strong>Upstream:</strong> <code>@Truncate(_review.Meta.Shas.Upstream)</code></span> |
| 204 | + <span><strong>PR Head:</strong> <code>@Truncate(_review.Meta.PrHeadSha)</code></span> |
| 205 | + <span><strong>Base:</strong> <code>@Truncate(_review.Meta.BaseSha)</code></span> |
| 206 | + <span><strong>Upstream:</strong> <code>@Truncate(_review.Meta.UpstreamSha)</code></span> |
207 | 207 | </div> |
208 | 208 | </div> |
209 | 209 | } |
@@ -552,47 +552,26 @@ else |
552 | 552 | } |
553 | 553 |
|
554 | 554 | <!-- Tab: Companion PR --> |
555 | | - @if (_activeTab == "companion" && _review.CompanionPr is not null) |
| 555 | + @if (_activeTab == "companion" && _review.Meta.CompanionPr is not null) |
556 | 556 | { |
557 | | - var cp = _review.CompanionPr; |
| 557 | + var companionPrNumber = ParseCompanionPrNumber(_review.Meta.CompanionPr); |
558 | 558 | <div class="section-card"> |
559 | 559 | <h3 class="section-title">Companion PR</h3> |
560 | 560 | <div class="quick-facts-row"> |
561 | 561 | <div class="qf-group"> |
562 | 562 | <span class="qf-label">PR</span> |
563 | | - <a href="https://github.com/mono/SkiaSharp/pull/@cp.PrNumber" target="_blank" rel="noopener noreferrer" class="label"> |
564 | | - SkiaSharp #@cp.PrNumber |
565 | | - </a> |
566 | | - </div> |
567 | | - @if (cp.FilesChanged is not null) |
568 | | - { |
569 | | - <div class="qf-group"> |
570 | | - <span class="qf-label">Files Changed</span> |
571 | | - <span class="qf-detail">@cp.FilesChanged</span> |
572 | | - </div> |
573 | | - } |
574 | | - </div> |
575 | | - @if (cp.GeneratedFilesSkipped is { Count: > 0 }) |
576 | | - { |
577 | | - <h4 class="change-category">Generated Files Skipped (@cp.GeneratedFilesSkipped.Count)</h4> |
578 | | - <ul class="skia-file-list"> |
579 | | - @foreach (var file in cp.GeneratedFilesSkipped) |
| 563 | + @if (companionPrNumber is not null) |
580 | 564 | { |
581 | | - <li><code>@file</code></li> |
| 565 | + <a href="https://github.com/mono/SkiaSharp/pull/@companionPrNumber" target="_blank" rel="noopener noreferrer" class="label"> |
| 566 | + @_review.Meta.CompanionPr |
| 567 | + </a> |
582 | 568 | } |
583 | | - </ul> |
584 | | - } |
585 | | - @if (cp.Findings is { Count: > 0 }) |
586 | | - { |
587 | | - <h4 class="change-category">Findings (@cp.Findings.Count)</h4> |
588 | | - @foreach (var finding in cp.Findings) |
589 | | - { |
590 | | - <div class="skia-file-entry"> |
591 | | - <div class="file-path"><code>@finding.File</code></div> |
592 | | - <div class="file-summary">@finding.Finding</div> |
593 | | - </div> |
594 | | - } |
595 | | - } |
| 569 | + else |
| 570 | + { |
| 571 | + <span class="label">@_review.Meta.CompanionPr</span> |
| 572 | + } |
| 573 | + </div> |
| 574 | + </div> |
596 | 575 | </div> |
597 | 576 | } |
598 | 577 | } |
@@ -624,6 +603,15 @@ else |
624 | 603 | private static string Truncate(string sha) => |
625 | 604 | sha.Length > 12 ? sha[..12] : sha; |
626 | 605 |
|
| 606 | + private static int? ParseCompanionPrNumber(string? companionPr) |
| 607 | + { |
| 608 | + if (companionPr is null) return null; |
| 609 | + var hashIdx = companionPr.LastIndexOf('#'); |
| 610 | + if (hashIdx >= 0 && int.TryParse(companionPr[(hashIdx + 1)..], out var num)) |
| 611 | + return num; |
| 612 | + return null; |
| 613 | + } |
| 614 | + |
627 | 615 | private void ToggleDiff(string key) |
628 | 616 | { |
629 | 617 | if (!_expandedDiffs.Remove(key)) |
|
0 commit comments