feat: load branch follower reuse config from source repos
This commit is contained in:
@@ -39,6 +39,12 @@ function nativeGateRows(native: Record<string, unknown> | null): unknown[][] {
|
||||
: gitMirror.sourceSnapshotReady === true ? "source-ready" : "source-not-ready";
|
||||
rows.push(["git-mirror", status, `${shortSha(stringOrNull(gitMirror.localSource))}/${shortSha(stringOrNull(gitMirror.githubSource))}`, stringOrNull(gitMirror.gitopsBranch) ?? stringOrNull(gitMirror.sourceBranch) ?? "-"]);
|
||||
}
|
||||
const reuseConfig = asOptionalRecord(native.reuseConfig);
|
||||
if (reuseConfig !== null) {
|
||||
const status = reuseConfig.ok === true ? "ready" : reuseConfig.present === true ? "invalid" : "missing";
|
||||
const detail = reuseConfig.ok === true ? `${reuseConfig.serviceCount ?? "-"} services` : arrayTextItems(reuseConfig.errors)[0] ?? "-";
|
||||
rows.push(["reuse-config", status, detail, stringOrNull(reuseConfig.path) ?? "-"]);
|
||||
}
|
||||
const tekton = asOptionalRecord(native.tekton);
|
||||
if (tekton !== null) {
|
||||
const status = tekton.succeeded === true ? "succeeded" : tekton.succeeded === false ? `failed:${stringOrNull(tekton.reason) ?? "unknown"}` : "running";
|
||||
|
||||
Reference in New Issue
Block a user