pub const TYPES: &[&str] = &[
"feat", "fix", "docs", "style", "refactor", "test", "chore", ];
pub const SCOPES: &[&str] = &["core", "ui", "api", "build", "docs", "tests"];
pub const BREAKING_CHANGE_MARKER: &str = "!";
#[derive(Debug)]
pub struct Changelog {
pub types: &'static [&'static str],
pub scopes: &'static [&'static str],
pub breaking_marker: &'static str,
}
pub fn get_changelog() -> Changelog {
Changelog {
types: TYPES,
scopes: SCOPES,
breaking_marker: BREAKING_CHANGE_MARKER,
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_changelog_contents() {
let changelog = get_changelog();
assert!(changelog.types.contains(&"feat"));
assert!(changelog.scopes.contains(&"ui"));
assert_eq!(changelog.breaking_marker, "!");
}
}