Skip to main content

levi_core/entities/
ref_fact.rs

1use myko::prelude::*;
2
3/// Observed branch head. id = "{project_id}:{branch}" — LWW: the newest
4/// observation wins.
5#[myko_item]
6pub struct RefFact {
7    pub project_id: String,
8    pub branch: String,
9    /// Head commit sha (hex).
10    pub head: String,
11    /// RFC3339
12    pub observed: String,
13}
14
15pub fn ref_fact_id(project_id: &str, branch: &str) -> String {
16    format!("{project_id}:{branch}")
17}