PR Auto-Labeler¶
Automatically label your pull requests based on code changes, patterns, and metadata
Overview¶
PR Auto-Labeler is a GitHub Action that intelligently labels pull requests by analyzing:
- 📁 Changed files — Detect frontend, backend, database, config changes
- 🔍 Code patterns — Find risky code, security issues, missing tests
- 📊 PR metadata — Check size, description quality, linked issues
- 🎯 Custom rules — Enable only the rules you need
Why Use It?¶
-
:material-clock-fast:{ .lg .middle } Save Time
Stop manually labeling PRs. Let automation handle it while you focus on code review.
-
:material-shield-check:{ .lg .middle } Catch Issues Early
Flag risky code, missing tests, and security concerns before they reach production.
-
:material-chart-line:{ .lg .middle } Improve Visibility
See at a glance what each PR changes — frontend, backend, database, tests, etc.
-
:material-cog:{ .lg .middle } Highly Customizable
Choose from 30+ rules. Enable only what your team needs. Override label names to match your workflow.
Features¶
🎯 Smart Labeling Rules¶
Choose from 30+ intelligent rules organized by category:
| Category | Rules | Example Labels |
|---|---|---|
| Frontend & UI | 2 rules | ui-change, style-change |
| Database | 4 rules | migration, risky-migration, safe-migration |
| Testing | 3 rules | test-missing, test-only-change |
| Security | 2 rules | security-change, risky-code |
| Dependencies | 3 rules | dependency-change, new-dependency |
| CI/CD | 3 rules | ci-change, docker-change, infra-change |
| Environment | 3 rules | env-change, potential-secret-leak |
| Code Semantics | 4 rules | new-feature, refactor, function-removed |
| PR Metadata | 4 rules | large-pr, missing-description, work-in-progress |
⚡ Zero-Config Defaults¶
All rules are disabled by default — you explicitly enable only what you need:
🎨 Custom Label Names¶
Override default labels to match your existing workflow:
🐛 Debug Mode¶
Enable detailed logging to understand exactly what the action is doing:
Quick Example¶
name: Auto Label PRs
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
label:
uses: workflow-kit/pr-auto-labeler/.github/workflows/pr-auto-labeler.yml@latest
with:
enabled_rules: '["ui-change", "test-missing", "large-pr"]'
When a PR changes Button.tsx without test changes:
Applied Labels:
- 🟢
ui-change— Frontend component modified - 🔴
test-missing— No test changes detected
Next Steps¶
Get up and running in 5 minutes
Learn all configuration options
Explore all 30+ available rules
See real-world usage examples