$ show Madrapps/jacoco-report
This is a GitHub Action that parses JaCoCo XML coverage reports and posts a formatted coverage summary as a comment on pull requests. It supports single and multi-module projects, aggregate reports, multiple counter types (INSTRUCTION, BRANCH, LINE, COMPLEXITY, METHOD), custom emojis, and comment update strategies. The action fetches the list of changed files from the PR via the GitHub API, computes overall and per-file coverage percentages, and renders a markdown table with pass/fail indicators based on configurable thresholds. The codebase is written in TypeScript, well-structured with clear separation of concerns (action orchestration, XML parsing, coverage computation, markdown rendering), and includes a comprehensive test suite with fixtures covering various report structures and edge cases.
The LLM identified 1 files worth highlighting for reuse:
Contains three reusable utility functions: `getChangedLines` parses git diff patches to extract added/modified line numbers using regex; `getFilesWithCoverage` extracts per-file coverage data (counters and line-level details) from parsed JaCoCo XML packages; `parseToReport` converts raw XML into a typed Report object using xml2js. These functions are self-contained, have no internal project dependencies beyond simple model types, and can be extracted into other projects that need to parse JaCoCo reports or git diffs.