feat: add fetched-at timestamp to markdown header and json meta

This commit is contained in:
2026-04-08 23:56:01 +08:00
parent ed67986320
commit a6daaff0fa
10 changed files with 23 additions and 5 deletions
+2
View File
@@ -10,6 +10,7 @@ fn model_json_roundtrip() {
pr_index: 9,
title: "feat: x".into(),
description: Some("desc".into()),
fetched_at: Some("2026-04-08T12:34:56Z".into()),
state: "open".into(),
author: "alice".into(),
base_branch: "main".into(),
@@ -50,5 +51,6 @@ fn model_json_roundtrip() {
let encoded = serde_json::to_string(&doc).unwrap();
let decoded: PrReviewDocument = serde_json::from_str(&encoded).unwrap();
assert_eq!(decoded.meta.repo, "org/repo");
assert_eq!(decoded.meta.fetched_at.as_deref(), Some("2026-04-08T12:34:56Z"));
assert_eq!(decoded.threads[0].root_comment.body, "hello");
}