feat: add hierarchical review numbering and pr description header
This commit is contained in:
@@ -11,6 +11,7 @@ fn render_markdown_includes_expected_sections_and_preserves_comment_markdown() {
|
||||
repo: "org/repo".into(),
|
||||
pr_index: 7,
|
||||
title: "Fix parser".into(),
|
||||
description: Some("PR body".into()),
|
||||
state: "open".into(),
|
||||
author: "alice".into(),
|
||||
base_branch: "main".into(),
|
||||
@@ -73,12 +74,14 @@ fn render_markdown_includes_expected_sections_and_preserves_comment_markdown() {
|
||||
assert!(md.contains("## Metadata"));
|
||||
assert!(md.contains("## Commits"));
|
||||
assert!(md.contains("## Diff Stat"));
|
||||
assert!(md.contains("## Review 1 (COMMENT)"));
|
||||
assert!(md.contains("> 编号规则:Review `<pr>.<review>`;Comment `<pr>.<review>.<comment>`;Reply `<pr>.<review>.<comment>.<reply>`"));
|
||||
assert!(md.contains("PR body"));
|
||||
assert!(md.contains("## Review 7.1 (COMMENT)"));
|
||||
assert!(md.contains("### Comment 7.1.1"));
|
||||
assert!(md.contains("src/main.rs:9"));
|
||||
assert!(md.contains("### Reply 7.1.1.1"));
|
||||
assert!(md.contains("src/main.rs:12"));
|
||||
let review_pos = md.find("## Review 1 (COMMENT)").unwrap();
|
||||
let review_pos = md.find("## Review 7.1 (COMMENT)").unwrap();
|
||||
let comment_pos = md.find("### Comment 7.1.1").unwrap();
|
||||
assert!(comment_pos > review_pos);
|
||||
assert!(!md.contains("## Comments (No Review)"));
|
||||
@@ -95,6 +98,7 @@ fn render_markdown_uses_minimal_fence_for_plain_text() {
|
||||
repo: "org/repo".into(),
|
||||
pr_index: 1,
|
||||
title: "T".into(),
|
||||
description: None,
|
||||
state: "open".into(),
|
||||
author: "alice".into(),
|
||||
base_branch: "main".into(),
|
||||
|
||||
Reference in New Issue
Block a user