git_iris/types/release_notes.rs
1//! Release notes types and formatting
2//!
3//! This module provides markdown-based release notes output that lets the LLM drive
4//! the structure while we beautify it for terminal display.
5
6use crate::types::review::render_markdown_for_terminal;
7use schemars::JsonSchema;
8use serde::{Deserialize, Serialize};
9
10/// Markdown-based release notes that lets the LLM determine structure
11#[derive(Serialize, Deserialize, Debug, Clone, JsonSchema)]
12pub struct MarkdownReleaseNotes {
13 /// The full markdown content of the release notes
14 pub content: String,
15}
16
17impl MarkdownReleaseNotes {
18 /// Render the markdown content with terminal styling
19 pub fn format(&self) -> String {
20 render_markdown_for_terminal(&self.content)
21 }
22
23 /// Get the raw markdown content (for file output, etc.)
24 pub fn raw_content(&self) -> &str {
25 &self.content
26 }
27}