fix: keep branch follower reuse status compact
This commit is contained in:
@@ -393,6 +393,7 @@ function compactStatusGates(payload: Record<string, unknown> | null): Record<str
|
||||
stageRef: stringOrNull(reuseConfig.stageRef),
|
||||
sha256: stringOrNull(reuseConfig.sha256),
|
||||
serviceCount: numberOrNull(reuseConfig.serviceCount),
|
||||
serviceIds: arrayStrings(reuseConfig.serviceIds).slice(0, 16),
|
||||
errors: Array.isArray(reuseConfig.errors) ? reuseConfig.errors.map(String).slice(0, 5) : [],
|
||||
},
|
||||
tekton: tekton === null ? null : {
|
||||
@@ -439,6 +440,10 @@ function arrayRecords(value: unknown): Record<string, unknown>[] {
|
||||
return Array.isArray(value) ? value.filter((item): item is Record<string, unknown> => typeof item === "object" && item !== null && !Array.isArray(item)) : [];
|
||||
}
|
||||
|
||||
function arrayStrings(value: unknown): string[] {
|
||||
return Array.isArray(value) ? value.map(String) : [];
|
||||
}
|
||||
|
||||
function compactFollowerDecision(state: FollowerState): Record<string, unknown> {
|
||||
return {
|
||||
phase: state.phase,
|
||||
|
||||
Reference in New Issue
Block a user