Summary
Add configuration options to:
- Enable/disable specific labels per repository
- Customize label colors via CSS3 color names
- Maintain backward compatibility (no config = current behavior)
Proposed Configuration
labels:
# If not set, ALL labels are enabled (backward compatible)
enabled-labels:
- verified
- hold
- wip
- needs-rebase
- has-conflicts
- can-be-merged
- size # All size/* labels
- branch # branch-* labels
- cherry-pick # cherry-pick-* labels
- automerge
# Optional: Override default colors (CSS3 color names)
colors:
hold: red
verified: green
approved-: green
lgtm-: yellowgreen
# ... etc
Label Categories
| Category |
Labels |
Configurable |
| Status |
verified, hold, wip, needs-rebase, has-conflicts, can-be-merged, automerge |
Enable/Disable + Colors |
| Size |
size/XS, size/S, etc. |
Enable/Disable + Colors |
| Branch |
branch-{name} |
Enable/Disable + Colors |
| Reviewed-by |
approved-, lgtm-, changes-requested-, commented- |
Colors ONLY (cannot disable) |
| Cherry-pick |
cherry-pick-*, CherryPicked |
Enable/Disable + Colors |
Important: reviewed-by Labels Are Always Enabled
The reviewed-by labels cannot be disabled because they are the only source of truth for the approval system. Disabling them would break:
minimum-lgtm requirement (counts lgtm-* labels)
- Approval validation (counts approved-* labels)
- Changes-requested blocking (checks changes-requested-* labels)
- Auto-merge workflow
Files to Modify
webhook_server/config/schema.yaml - Add labels schema
webhook_server/utils/constants.py - Remove hardcoded colors
webhook_server/libs/github_api.py - Load labels config
webhook_server/libs/handlers/labels_handler.py - Check enabled + use configured colors
webhook_server/libs/handlers/pull_request_handler.py - Conditional label operations
webhook_server/libs/handlers/issue_comment_handler.py - Conditional /wip, /hold, /verified
- Tests and documentation
Acceptance Criteria
Summary
Add configuration options to:
Proposed Configuration
Label Categories
Important: reviewed-by Labels Are Always Enabled
The reviewed-by labels cannot be disabled because they are the only source of truth for the approval system. Disabling them would break:
minimum-lgtmrequirement (counts lgtm-* labels)Files to Modify
webhook_server/config/schema.yaml- Add labels schemawebhook_server/utils/constants.py- Remove hardcoded colorswebhook_server/libs/github_api.py- Load labels configwebhook_server/libs/handlers/labels_handler.py- Check enabled + use configured colorswebhook_server/libs/handlers/pull_request_handler.py- Conditional label operationswebhook_server/libs/handlers/issue_comment_handler.py- Conditional /wip, /hold, /verifiedAcceptance Criteria