feat(severity): add trivial + info levels
This commit is contained in:
+5
-3
@@ -68,10 +68,11 @@ _SHA_MARKER_RE = re.compile(r"<!-- pragent:sha=([0-9a-f]{7,40}) -->")
|
||||
AI_REVIEW_LABEL = "AI-REVIEW"
|
||||
# Opt-in label for the token-usage block. Read at render time — see pr_has_label.
|
||||
AI_USAGE_LABEL = "AI-USAGE"
|
||||
SEVERITIES = ("critical", "high", "medium", "low")
|
||||
SEVERITIES = ("critical", "high", "medium", "low", "trivial", "info")
|
||||
# Severity rank — higher = more severe. Used by `apply_repo_config` to drop
|
||||
# findings below `severity_threshold`. Critical=3, high=2, medium=1, low=0.
|
||||
SEVERITY_RANK = {"low": 0, "medium": 1, "high": 2, "critical": 3}
|
||||
# findings below `severity_threshold`. critical=4, high=3, medium=2, low=1,
|
||||
# trivial=0, info=-1.
|
||||
SEVERITY_RANK = {"info": -1, "trivial": 0, "low": 1, "medium": 2, "high": 3, "critical": 4}
|
||||
REPO_CONFIG_FILE = ".pr-review.json"
|
||||
|
||||
# Style → (default max_findings, default severity_threshold). Strict is
|
||||
@@ -957,6 +958,7 @@ _SEVERITY_EMOJI = {
|
||||
"high": "🔴",
|
||||
"medium": "🟡",
|
||||
"low": "🔵",
|
||||
"trivial": "⚪",
|
||||
"info": "⚪",
|
||||
"nit": "⚪",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user