kevsersrca/GitHub Coverage Bot
Compute Go diff coverage from a cover profile and optionally post a Markdown report on the pull request.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| repo | GitHub repository as owner/name (defaults to GITHUB_REPOSITORY on pull_request workflows) | no | "" |
| pr | Pull request number (defaults from GITHUB_EVENT_PATH pull_request) | no | "" |
| base-sha | Base commit SHA (defaults from pull_request event) | no | "" |
| head-sha | Head commit SHA (defaults from pull_request event) | no | "" |
| coverprofile | Path to the go test coverage profile file (relative to repo root in the workspace) | no | cover.out |
| repo-root | Repository root for git diff invocations | no | . |
| min-diff-coverage | Advisory warning threshold percentage for diff coverage (0 disables) | no | 80 |
| comment | Upsert a pull request comment on GitHub | no | true |
| output | Stdout format: md, json, or both | no | json |
| marker | Hidden HTML comment used to locate the bot's previous PR comment | no | <!-- github-coverage-bot --> |
| github-api-url | GitHub REST API base URL (override for GitHub Enterprise Server) | no | https://api.github.com |
| github-token | Token with permission to comment on pull requests | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| diff-coverage | Diff coverage percentage for changed lines |
| repo-coverage | Whole-repository coverage percentage from the profile |
| meets-threshold | Whether diff coverage meets min-diff-coverage when enabled |