kshutkin/Coverage Badge
Discover coverage reports, generate self-contained SVG badges, and force-push them with the reports to an orphan branch.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| branch | Orphan branch where badges and coverage reports are force-pushed. | no | coverage |
| coverage-paths | Comma- or newline-separated globs that match coverage folders to process. | no | **/coverage |
| ignore | Comma- or newline-separated globs to exclude during discovery. | no | **/node_modules/** |
| metric | Which metric to display on the badge: lines, statements, branches, or functions. | no | branches |
| label | Left-side label text on the badge. | no | coverage |
| thresholds | Comma-separated upper-bound:color pairs sorted ascending. The first bucket whose upper bound is greater than the percentage wins. | no | 50:red,60:orange,70:yellow,80:yellowgreen,90:green,100:brightgreen |
| precision | Number of decimal places shown on the percentage. | no | 0 |
| style | Badge style. Only 'flat' is supported in v1. | no | flat |
| commit-message | Commit message used when pushing to the orphan branch. | no | chore: update coverage badges |
| commit-user-name | Git user.name used for the commit. | no | github-actions[bot] |
| commit-user-email | Git user.email used for the commit. | no | 41898282+github-actions[bot]@users.noreply.github.com |
| token | GitHub token with contents:write permission used to push the orphan branch. | no | ${{ github.token }} |
| dry-run | If 'true', generate badges into a temp dir but skip the git push step. | no | false |
Outputs
| name | description |
|---|---|
| branch | The branch the badges were pushed to. |
| commit-sha | SHA of the commit pushed to the orphan branch (empty when dry-run or nothing to commit). |
| badges-json | JSON array of generated badges: [{path, metric, pct, color}]. |