feat: load branch follower reuse config from source repos
This commit is contained in:
@@ -369,6 +369,7 @@ function compactAdapterStatus(live: AdapterSummary): Record<string, unknown> {
|
||||
function compactStatusGates(payload: Record<string, unknown> | null): Record<string, unknown> | null {
|
||||
if (payload === null) return null;
|
||||
const gitMirror = asOptionalRecord(payload.gitMirror);
|
||||
const reuseConfig = asOptionalRecord(payload.reuseConfig);
|
||||
const tekton = asOptionalRecord(payload.tekton);
|
||||
const taskRuns = asOptionalRecord(payload.taskRuns);
|
||||
const argo = asOptionalRecord(payload.argo);
|
||||
@@ -384,6 +385,16 @@ function compactStatusGates(payload: Record<string, unknown> | null): Record<str
|
||||
localGitops: stringOrNull(gitMirror.localGitops),
|
||||
githubGitops: stringOrNull(gitMirror.githubGitops),
|
||||
},
|
||||
reuseConfig: reuseConfig === null ? null : {
|
||||
ok: reuseConfig.ok === true,
|
||||
present: reuseConfig.present === true,
|
||||
path: stringOrNull(reuseConfig.path),
|
||||
sourceCommit: stringOrNull(reuseConfig.sourceCommit),
|
||||
stageRef: stringOrNull(reuseConfig.stageRef),
|
||||
sha256: stringOrNull(reuseConfig.sha256),
|
||||
serviceCount: numberOrNull(reuseConfig.serviceCount),
|
||||
errors: Array.isArray(reuseConfig.errors) ? reuseConfig.errors.map(String).slice(0, 5) : [],
|
||||
},
|
||||
tekton: tekton === null ? null : {
|
||||
name: stringOrNull(tekton.name),
|
||||
succeeded: tekton.succeeded === true ? true : tekton.succeeded === false ? false : null,
|
||||
|
||||
Reference in New Issue
Block a user