From e0ade37433c872dc325ac65adafbfb6df74f773d Mon Sep 17 00:00:00 2001 From: Sebastian Poxhofer Date: Mon, 13 Nov 2023 04:38:14 +0100 Subject: [PATCH] fix(datasource/galaxy): loosen schema (#25712) --- lib/modules/datasource/galaxy/index.ts | 6 ++++-- lib/modules/datasource/galaxy/schema.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/modules/datasource/galaxy/index.ts b/lib/modules/datasource/galaxy/index.ts index edc3b7c66d93cb..698d9ede78f73c 100644 --- a/lib/modules/datasource/galaxy/index.ts +++ b/lib/modules/datasource/galaxy/index.ts @@ -73,12 +73,14 @@ export class GalaxyDatasource extends Datasource { } result.releases = versions.map( - (version: { name: string; created: string }) => { + (version: { name: string; created?: string }) => { const release: Release = { version: version.name, - releaseTimestamp: version.created, }; + if (is.nonEmptyString(version.created)) { + release.releaseTimestamp = version.created; + } return release; }, ); diff --git a/lib/modules/datasource/galaxy/schema.ts b/lib/modules/datasource/galaxy/schema.ts index a5362dbb4204cc..7fb519004908e3 100644 --- a/lib/modules/datasource/galaxy/schema.ts +++ b/lib/modules/datasource/galaxy/schema.ts @@ -8,7 +8,7 @@ export const GalaxyV1 = z.object({ versions: z.array( z.object({ name: z.string(), - created: z.string(), + created: z.string().optional(), }), ), }),