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

Function plan

ci/tools/coderabbit_addressor.py:162–189  ·  view source on GitHub ↗
(pr: int)

Source from the content-addressed store, hash-verified

160
161
162def plan(pr: int) -> dict[str, Any]:
163 comments = fetch_comments(pr)
164 top_level = [
165 c for c in comments if c.in_reply_to is None and c.author in CODERABBIT_LOGINS
166 ]
167 buckets: dict[str, list[dict[str, Any]]] = {
168 "valid-fix": [],
169 "style": [],
170 "false-positive": [],
171 "security-flag": [],
172 }
173 for c in top_level:
174 if _is_resolved(c, comments):
175 continue
176 buckets[c.classification].append(
177 {
178 "id": c.id,
179 "path": c.path,
180 "line": c.line,
181 "body": c.body[:400],
182 }
183 )
184 return {
185 "pr": pr,
186 "total_open": sum(len(v) for v in buckets.values()),
187 "buckets": buckets,
188 "max_iterations": MAX_ITERATIONS,
189 }
190
191
192def reply(pr: int, comment_id: int, message: str) -> None:

Callers 2

checkFunction · 0.85
mainFunction · 0.85

Calls 4

fetch_commentsFunction · 0.85
_is_resolvedFunction · 0.85
valuesMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected