0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-13 08:01:49 +00:00
renovatebot_renovate/lib/modules/manager/bitrise/extract.ts
2025-01-24 11:30:56 +00:00

18 lines
479 B
TypeScript

import { logger } from '../../../logger';
import type { PackageFileContent } from '../types';
import { BitriseFile } from './schema';
export function extractPackageFile(
content: string,
packageFile: string,
): PackageFileContent | null {
const deps = BitriseFile.catch(({ error: err }) => {
logger.debug({ err, packageFile }, `Failed to parse Bitrise YAML config`);
return [];
}).parse(content);
if (!deps.length) {
return null;
}
return { deps };
}