pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("GitHub authentication failed - run `gh auth login` or set GITHUB_TOKEN")]
AuthenticationFailed,
#[error("no GitHub token found - run `gh auth login` or set GITHUB_TOKEN")]
NoToken,
#[error("GitHub API rate limit exceeded - wait and try again")]
RateLimited,
#[error("repository not found or no access: {0}")]
RepoNotFound(String),
#[error("pull request not found: #{0}")]
PrNotFound(u64),
#[error("GitHub API error ({status}): {message}")]
ApiError { status: u16, message: String },
#[error("network error: {0}")]
Network(#[from] reqwest::Error),
#[error("failed to parse GitHub response: {0}")]
Parse(#[from] serde_json::Error),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
}