MCPcopy Create free account
hub / github.com/FastLED/FastLED / Comment

Class Comment

ci/tools/coderabbit_addressor.py:63–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62@dataclass
63class Comment:
64 id: int
65 author: str
66 body: str
67 path: str
68 line: Optional[int]
69 in_reply_to: Optional[int]
70
71 @property
72 def classification(self) -> str:
73 body_lower = self.body.lower()
74 for kw in SECURITY_KEYWORDS:
75 if kw in body_lower:
76 return "security-flag"
77 if re.search(r"```suggestion", self.body):
78 return "valid-fix"
79 for kw in STYLE_KEYWORDS:
80 if kw in body_lower:
81 return "style"
82 if any(
83 tok in body_lower
84 for tok in (
85 "should be",
86 "bug:",
87 "error:",
88 "issue:",
89 "missing ",
90 "incorrect",
91 )
92 ):
93 return "valid-fix"
94 return "false-positive"
95
96
97def _run_gh(args: list[str]) -> str:

Callers 1

fetch_commentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected