Skip to content

Commit 94b94d2

Browse files
WhiteElephant-abcgemini-code-assist[bot]
authored andcommitted
WhiteElephant-abc#149 应用gemini的建议
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 15871bc commit 94b94d2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ def extract_pr_timeline_items(resource_data: Dict) -> List[TimelineItem]:
216216
# 即使 review body 为空也要添加到 timeline,因为 latest_comment_url 可能指向 review 本身
217217
# 例如:review comment 的 latest_comment_url 指向 review,但 @ 提及在 review comment 中
218218
# 如果 review 不在 timeline 中,就无法通过 ID 匹配找到它,也就无法回退搜索
219-
created_at = r.get("submittedAt", r.get("createdAt", ""))
220-
if not created_at:
221-
created_at = "1970-01-01T00:00:00Z" # 默认值
219+
created_at = r.get("submittedAt") or r.get("createdAt") or "1970-01-01T00:00:00Z" # 默认值
222220
timeline.append(TimelineItem(
223221
id=str(r.get("id", "")),
224222
body=r.get("body", ""),

0 commit comments

Comments
 (0)