feat(commit): 添加提交消息模板支持
- 移除 config 命令中未使用的 List 子命令及相关显示字段 - 统一 ChangelogCommand 和 CommitCommand 的 ContentGenerator 初始化方式
This commit is contained in:
@@ -386,6 +386,22 @@ impl ConfigManager {
|
||||
self.config.repo_profiles.get(repo_path)
|
||||
}
|
||||
|
||||
/// Find profiles whose repo_patterns match the given repo path
|
||||
pub fn match_profiles_by_repo_pattern(&self, repo_path: &str) -> Vec<&GitProfile> {
|
||||
self.config
|
||||
.profiles
|
||||
.values()
|
||||
.filter(|p| {
|
||||
p.settings.repo_patterns.iter().any(|pattern| {
|
||||
let trimmed = pattern.trim_matches('*');
|
||||
repo_path.ends_with(trimmed)
|
||||
|| repo_path.starts_with(trimmed)
|
||||
|| repo_path == trimmed
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
// LLM configuration
|
||||
|
||||
/// Get LLM provider
|
||||
|
||||
Reference in New Issue
Block a user