feat: load branch follower reuse config from source repos

This commit is contained in:
Codex
2026-07-03 20:42:46 +00:00
parent 19d270b44b
commit b0cb23b0e0
8 changed files with 435 additions and 13 deletions
@@ -143,6 +143,7 @@ function compactNativePayload(payload) {
if (value === null) return null;
return {
gitMirror: compactGitMirror(value.gitMirror),
reuseConfig: compactReuseConfig(value.reuseConfig),
tekton: compactTekton(value.tekton),
taskRuns: compactTaskRuns(value.taskRuns),
planArtifacts: compactPlanArtifacts(value.planArtifacts),
@@ -154,6 +155,27 @@ function compactNativePayload(payload) {
};
}
function compactReuseConfig(reuseConfig) {
const value = recordOrNull(reuseConfig);
if (value === null) return null;
return {
ok: value.ok === true,
present: value.present === true,
path: stringOrNull(value.path),
sourceCommit: stringOrNull(value.sourceCommit),
stageRef: stringOrNull(value.stageRef),
sha256: stringOrNull(value.sha256),
serviceCount: numberOrNull(value.serviceCount),
services: arrayRecords(value.services).slice(0, 8).map((service) => ({
id: stringOrNull(service.id),
runtimeReuse: recordOrNull(service.runtimeReuse),
envReuse: recordOrNull(service.envReuse),
})),
errors: arrayStrings(value.errors).slice(0, 5),
valuesRedacted: true,
};
}
function compactGitMirror(gitMirror) {
const value = recordOrNull(gitMirror);
if (value === null) return null;