feat: address requested review feedback (Closes #1338)
This commit is contained in:
1 parent
bad14d1b94
commit
091a01ba67
6 files changed
+381
-10
No files matched your search
@@ -2781,6 +2781,9 @@ def _normalize_review_comments(comments: object) -> list[dict]:
|
||||
if not isinstance(path, str) or not path.strip() or not isinstance(body, str) or not body.strip():
|
||||
continue
|
||||
item = {"path": path.strip()[:300], "body": body.strip()[:500]}
|
||||
comment_id = comment.get("id")
|
||||
if isinstance(comment_id, int) and comment_id > 0:
|
||||
item["id"] = comment_id
|
||||
position = comment.get("new_position") or comment.get("old_position")
|
||||
if isinstance(position, int) and position > 0:
|
||||
item["line"] = position
|
||||
@@ -2849,6 +2852,7 @@ def _normalize_reviewer_statuses(pull: dict, reviews: object, head_sha: str) ->
|
||||
current = review["commit_id"] == head_sha
|
||||
status = state_names[review["state"]] if current else "outdated"
|
||||
statuses[key] = {
|
||||
"review_id": review["id"],
|
||||
"login": review["login"],
|
||||
"status": status,
|
||||
"head_sha": review["commit_id"],
|
||||
|
||||
Reference in new issue
Block a user