Skip to main content

commit_wizard/engine/constants/
mod.rs

1pub mod defaults;
2pub mod emoji;
3pub mod env;
4pub mod paths;
5
6pub use defaults::*;
7pub use emoji::*;
8pub use env::*;
9pub use paths::*;
10
11pub const APP_NAME: &str = "commit-wizard";
12pub const BIN_NAME: &str = "cw";
13
14pub const CONFIG_FILE_NAME: &str = "config.toml";
15pub const RULES_FILE_NAME: &str = "rules.toml";
16pub const STATE_FILE_NAME: &str = "state.json";
17pub const REGISTRY_BASE_CONFIG_FILE_NAME: &str = "config.toml";
18pub const REGISTRY_RULES_CONFIG_FILE_NAME: &str = "rules.toml";
19pub const PROJECT_CONFIG_FILE_NAME: &str = "cwizard.toml";
20pub const PROJECT_CONFIG_FILE_NAME_HIDDEN: &str = ".cwizard.toml";
21
22pub const CONFIG_DIR_NAME: &str = "cwizard";
23
24pub const COMMIT_FIX_FILE_NAME: &str = ".cw-fix.json";
25pub const TEMP_FIX_FILE_NAME: &str = ".cw-fix-session.json";
26pub const CACHE_DIR_NAME: &str = "cwizard";
27pub const STATE_DIR_NAME: &str = "cwizard";
28pub const REGISTRIES_DIR_NAME: &str = "registries";
29
30pub fn default_branch_protected_patterns() -> Vec<String> {
31    vec![
32        "main".to_string(),
33        "master".to_string(),
34        "release/*".to_string(),
35    ]
36}
37
38pub fn default_changelog_group_by() -> Vec<String> {
39    vec!["type".to_string()]
40}
41
42pub fn default_changelog_section_order() -> Vec<String> {
43    vec![
44        "feat".to_string(),
45        "fix".to_string(),
46        "docs".to_string(),
47        "style".to_string(),
48        "refactor".to_string(),
49        "perf".to_string(),
50        "test".to_string(),
51        "chore".to_string(),
52    ]
53}