merge-ready 0.1.0

Show pull request merge blockers as concise prompt tokens
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::domain::error::RepositoryError;

/// PR のライフサイクル状態(外部コマンドの文字列表現に非依存)
pub enum PrLifecycle {
    Open,
    NotOpen,
}

pub fn is_open(lifecycle: &PrLifecycle) -> bool {
    matches!(lifecycle, PrLifecycle::Open)
}

pub trait PrStateRepository {
    fn fetch_lifecycle(&self) -> Result<PrLifecycle, RepositoryError>;
}