in eng/copilot/fixErrorWithDeepPrompt.js [6:31]
function getErrorMessage(ciError) {
const lines = ciError.split('\n');
let errors = [];
let currentError = null;
lines.forEach(line => {
const errorCollectingPrefix = 'ERROR collecting ';
const errorSummaryPrefix = 'short test summary info ';
if (line.includes(errorSummaryPrefix)) {
if (currentError) {
errors.push(currentError);
}
}
else if (line.includes(errorCollectingPrefix)) {
if (currentError) {
errors.push(currentError);
}
const filename = line.substring(line.indexOf(errorCollectingPrefix) + 16, line.indexOf(' ________________'));
currentError = { filename: filename.trim(), errorMessage: '' };
} else if (currentError) {
currentError.errorMessage += line + '\n';
}
});
return errors;
}