shipit 2.1.3

Shipit is an open source command line interface for managing merge requests, changelogs, tags, and releases using a plan and apply interface. Built with coding agent integration in mind.
Documentation
use std::fmt;

#[derive(Debug)]
pub enum ShipItError {
    Git(git2::Error),
    Gitlab(Box<gitlab::GitlabError>),
    GitHub(Box<octocrab::Error>),
    Error(String),
}

impl fmt::Display for ShipItError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            Self::Git(e) => write!(f, "Git operation failed with: {}", e),
            Self::Gitlab(e) => write!(f, "Gitlab operation failed with: {}", e),
            Self::GitHub(e) => write!(f, "GitHub operation failed with: {}", e),
            Self::Error(e) => write!(f, "{}", e),
        }
    }
}

impl std::error::Error for ShipItError {
    fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
        match self {
            ShipItError::Git(e) => Some(e),
            ShipItError::Gitlab(e) => Some(e),
            ShipItError::GitHub(e) => Some(e),
            _ => None,
        }
    }
}