Merge pull request #19724 from ganhammar/fix/coverage-backend-add-text-body-parser

Add text body-parser to coverage-backend-plugin for LCOV reports
This commit is contained in:
Johan Haals
2023-09-05 10:32:43 +02:00
committed by GitHub
3 changed files with 8 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-code-coverage-backend': patch
---
Add text body parser for LCOV reports
@@ -75,9 +75,9 @@ export class Lcov implements Converter {
this.logger.debug(`matched ${file} to ${filename}`);
if (filename) {
if (scmFiles.length === 0 || filename) {
return {
filename,
filename: filename || file,
lineHits: {},
branchHits: {},
};
@@ -67,6 +67,7 @@ export const makeRouter = async (
bodyParserXml(BodyParser);
const router = Router();
router.use(BodyParser.xml());
router.use(BodyParser.text());
router.use(express.json());
const utils = new CoverageUtils(scm, urlReader);