๐ค Action: PR Risk Analyzer
Surgically protect your main branches by dynamically highlighting changes in mission-critical files.
[!CAUTION] The PR Risk Analyzer acts as a final safety net. It scans Pull Requests for modifications matching high-risk patterns (e.g.,
package.json,server.js). If detected, it applies ahigh-risklabel and injects an alert block at the top of the PR.
๐ Key Impact
- ๐จ Critical Watchlist: Automatically monitors changes to core configuration, security, and infrastructure files.
- ๐ท๏ธ Automated Labeling: Applies visual
high-risktags for immediate reviewer prioritization. - โ ๏ธ Inline Warnings: Injects aggressive feedback directly into the PR description to prevent accidental merges.
โ๏ธ Configuration
| Input | Required | Default | Description |
|---|---|---|---|
github-token |
Yes | - | Token for labeling and patching descriptions. |
critical-patterns |
No | .github/... |
Space-separated file patterns to watch. |
โก Quick Start
- name: ๐ค Perform Risk Analysis
uses: carlos-camara/qa-hub-actions/pr-risk-analyzer@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
critical-patterns: 'config/ migrations/ auth.js'
[View Full Wiki](https://carlos-camara.github.io/qa-hub-actions/actions/pr-risk-analyzer/)