Skip to main content

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    #[must_use]
20    pub fn format(&self) -> String {
21        render_markdown_for_terminal(&self.content)
22    }
23
24    /// Get the raw markdown content (for file output, etc.)
25    #[must_use]
26    pub fn raw_content(&self) -> &str {
27        &self.content
28    }
29}