Skip to content

๐Ÿค– 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 a high-risk label 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-risk tags 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/)