Repository navigation
Pull request comments: CodeDiag now keeps one comment on each pull request with the score and the findings in the files that pull request changes.
permissions:
contents: read
pull-requests: write
jobs:
codediag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: sabahattink/codediag@v0
with:
threshold: 80
comment: trueWhat the comment shows
- ✅ or ❌: the score and grade against your threshold.
- The change since the previous push, such as
▲ +3 since the last run. - The analyzer table.
- Findings in the files this pull request adds or modifies. Critical findings come first, and each rule links to its documentation.
- A count of findings elsewhere in the project, plus suppressed and baseline findings.
Every push updates the same comment, so the pull request never collects duplicates.
Safe by default
commentis off unless you set it totrue.- Runs outside a pull request skip the comment.
- If the comment can't be written (for example, a fork's read-only token), the Action logs a warning. The scan result, outputs, and threshold gate work as before.
- No new dependencies. The comment uses the workflow's
GITHUB_TOKENthrough the REST API.
See the GitHub Action guide.
Full changelog: https://github.com/sabahattink/codediag/blob/main/CHANGELOG.md