Skip to content

Commit 3189dd3

Browse files
committed
Use pr number if there is a PR number otherwise use a commit sha
1 parent f7d6b78 commit 3189dd3

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

site/frontend/src/pages/status/page.vue

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,30 @@ function ExpectedCurrentRequestCompletion() {
124124
const diffSeconds = differenceInSeconds(estimatedCompleted, now);
125125
const prettyDisplay = formatSecondsAsDuration(diffSeconds);
126126
127-
return (
128-
<span>
129-
Current Benchmark for{" "}
130-
<strong>
131-
<CommitSha tag={req.tag}></CommitSha>
132-
</strong>{" "}
133-
expected to end in approximately {prettyDisplay}
134-
</span>
135-
);
127+
if (req.requestType === "Release") {
128+
return (
129+
<span>
130+
Current Benchmark for{" "}
131+
<strong>
132+
<CommitSha tag={req.tag}></CommitSha>
133+
</strong>{" "}
134+
expected to end in approximately {prettyDisplay}
135+
</span>
136+
);
137+
} else {
138+
const url = `https://github.com/rust-lang/rust/pull/${req.pr}`;
139+
return (
140+
<span>
141+
Current Benchmark for PR{" "}
142+
<strong>
143+
<a href={url} target="_blank">
144+
#{req.pr}
145+
</a>{" "}
146+
</strong>
147+
expected to end in approximately {prettyDisplay}
148+
</span>
149+
);
150+
}
136151
}
137152
138153
function PullRequestLink({request}: {request: BenchmarkRequest}) {

0 commit comments

Comments
 (0)