Skip to content

Commit

Permalink
chore: add log missing raw data for YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jan 11, 2025
1 parent d161fb2 commit 3c26b6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/github/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function getConfigurationFromRepo(context: GitHubContext, repositor
});

if (!rawData) {
console.error(`No raw data for configuration at ${owner}/${repository}`);
console.log(`No raw data for configuration at ${owner}/${repository}`);
return { config: null, errors: null, rawData: null };
}

Expand Down Expand Up @@ -186,11 +186,13 @@ export function parseYaml(data: null | string) {
try {
if (data) {
const parsedData = YAML.parse(data);
console.log("Parsed YAML data");
return { yaml: parsedData ?? null, errors: null };
}
} catch (error) {
console.error("Error parsing YAML", error);
return { errors: [error] as YAMLError[], yaml: null };
}
console.log("Could not parse YAML");
return { yaml: null, errors: null };
}

0 comments on commit 3c26b6b

Please sign in to comment.