feat: add interactive conventional commit workflow with jj-lib backend

Replace CLI executor with jj-lib integration, implement full interactive
commit workflow via prompts, and add mock infrastructure for testing.
Add CLI integration tests and error handling tests.
This commit is contained in:
2026-03-07 00:53:13 +01:00
parent 1b66d7f86c
commit a45f0424f4
23 changed files with 2392 additions and 1016 deletions

View File

@@ -1,6 +1,6 @@
use crate::commit::types::{CommitMessageError, DescriptionError, ScopeError};
#[derive(Debug, thiserror::Error)]
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum Error {
// Domain errors
#[error("Invalid scope: {0}")]
@@ -50,33 +50,3 @@ impl From<std::io::Error> for Error {
Self::FailedGettingCurrentDir
}
}
impl From<jj_lib::config::ConfigGetError> for Error {
fn from(_: jj_lib::config::ConfigGetError) -> Self {
Self::FailedReadingConfig
}
}
impl From<jj_lib::repo::RepoLoaderError> for Error {
fn from(error: jj_lib::repo::RepoLoaderError) -> Self {
Self::JjOperation {
context: format!("Failed to load repository: {}", error),
}
}
}
impl From<jj_lib::backend::BackendError> for Error {
fn from(error: jj_lib::backend::BackendError) -> Self {
Self::JjOperation {
context: format!("Backend operation failed: {}", error),
}
}
}
impl From<jj_lib::transaction::TransactionCommitError> for Error {
fn from(error: jj_lib::transaction::TransactionCommitError) -> Self {
Self::JjOperation {
context: format!("Transaction commit failed: {}", error),
}
}
}