Skip to main content

GithubFacts

Trait GithubFacts 

Source
pub trait GithubFacts {
    // Required method
    fn resolve_ref(
        &self,
        owner_repo: &str,
        git_ref: &str,
    ) -> Result<Option<String>>;

    // Provided methods
    fn commit_reachable(
        &self,
        _owner_repo: &str,
        _sha: &str,
    ) -> Result<Option<bool>> { ... }
    fn ref_timestamp(
        &self,
        _owner_repo: &str,
        _git_ref: &str,
    ) -> Result<Option<i64>> { ... }
    fn ref_count(&self, _owner_repo: &str) -> Result<Option<usize>> { ... }
}
Expand description

GitHub에 대한 사실 조회.

Required Methods§

Source

fn resolve_ref(&self, owner_repo: &str, git_ref: &str) -> Result<Option<String>>

owner/repogit_ref(태그/브랜치)가 현재 가리키는 커밋 SHA. 참조가 존재하지 않으면 Ok(None).

Provided Methods§

Source

fn commit_reachable( &self, _owner_repo: &str, _sha: &str, ) -> Result<Option<bool>>

커밋이 저장소의 정식 히스토리에서 도달 가능한가 (R5 임포스터 커밋 판정). Ok(None) = 판정 불가(미지원) — 규칙은 조용히 건너뛴다.

Source

fn ref_timestamp( &self, _owner_repo: &str, _git_ref: &str, ) -> Result<Option<i64>>

참조가 가리키는 커밋의 커미터 시각, unix epoch 초 (R10 쿨다운 판정). Ok(None) = 참조 없음 또는 판정 불가 — 규칙은 조용히 건너뛴다.

Source

fn ref_count(&self, _owner_repo: &str) -> Result<Option<usize>>

저장소의 버전 태그 개수 (R2 교차 검증) — 유명 액션은 수십 개, 급조 짝퉁은 0~2개. Ok(None) = 판정 불가(미지원/저장소 없음) — 승격하지 않는다.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§