Merge "CheckSubmitRule: Return Optional#empty() if all checkers are optional"
diff --git a/web/fetcher.ts b/web/fetcher.ts
index 00a8187..11eee6a 100644
--- a/web/fetcher.ts
+++ b/web/fetcher.ts
@@ -111,21 +111,16 @@
};
if (check.started) run.startedTimestamp = new Date(check.started);
if (check.finished) run.finishedTimestamp = new Date(check.finished);
+ if (check.url) run.statusLink = check.url;
if (status === 'RUNNING') {
if (check.message) {
run.statusDescription = check.message;
} else if (check.state === 'SCHEDULED') {
run.statusDescription = 'scheduled only, not yet running';
}
- if (check.url) {
- run.statusLink = check.url;
- }
} else if (check.state === 'SUCCESSFUL') {
run.statusDescription =
check.message || `Passed (${computeDuration(check)})`;
- if (check.url) {
- run.statusLink = check.url;
- }
} else if (check.state === 'FAILED') {
run.results = [
{
diff --git a/web/fetcher_test.ts b/web/fetcher_test.ts
index a32243e..25a66da 100644
--- a/web/fetcher_test.ts
+++ b/web/fetcher_test.ts
@@ -123,6 +123,7 @@
assert.equal(converted.status, RunStatus.COMPLETED);
assert.equal(converted.actions?.length, 1);
assert.equal(converted.results?.length, 1);
+ assert.equal(converted.statusLink, check3.url);
const result = converted.results?.[0];
assert.equal(result?.category, Category.ERROR);
assert.equal(result?.summary, check3.message);