Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
GitOrigin-RevId: ab91def2af1bafbea7be6cef9a39721b2be12424
  • Loading branch information
Jigsaw authored and copybara-github committed Dec 18, 2024
1 parent 74c854b commit b720a2d
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/tasks/categorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,24 +326,6 @@ export function findMissingComments(
return missingComments;
}

/**
* Parses a JSON string representing topics into an array of Topic objects.
*
* @param topicsJsonString The JSON string to parse.
* @returns An array of Topic objects.
* @throws An error if the input is not a valid JSON string representing an array of Topic objects.
*/
export function parseTopicsJson(topicsJsonString: string): Topic[] {
try {
return JSON.parse(topicsJsonString);
} catch (error) {
throw new Error(
`Invalid topics JSON string. Please provide a valid JSON array of Topic objects,
JSON parse error: ${error}`
);
}
}

/**
* Processes the categorized comments, validating them and updating the categorized and uncategorized arrays.
*
Expand Down

0 comments on commit b720a2d

Please sign in to comment.