pub struct GitHubChecks {
pub sha: String,
pub state: String,
pub runs: Vec<GitHubCheckRun>,
}Expand description
What CI says about one commit.
Two GitHub mechanisms in one shape: the older commit STATUSES (a context and a state) and the newer CHECK RUNS (a name, a status and a conclusion). A repository can use either or both, and a person wants one answer.
Fields§
§sha: StringThe commit these are about.
state: Stringsuccess | failure | pending | neutral — the whole commit’s
verdict, decided by the rules in GitHubChecks::rollup.
runs: Vec<GitHubCheckRun>Implementations§
Source§impl GitHubChecks
impl GitHubChecks
Sourcepub fn rollup(runs: &[GitHubCheckRun]) -> String
pub fn rollup(runs: &[GitHubCheckRun]) -> String
One verdict for a commit, from every run reported about it.
The order is what a person cares about, worst first: anything failing makes the commit failing, anything still running makes it pending, and only then is it a success. A rollup that let a green check hide a red one would be worse than showing nothing.
Trait Implementations§
Source§impl Clone for GitHubChecks
impl Clone for GitHubChecks
Source§impl Debug for GitHubChecks
impl Debug for GitHubChecks
Source§impl<'de> Deserialize<'de> for GitHubChecks
impl<'de> Deserialize<'de> for GitHubChecks
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GitHubChecks
Source§impl PartialEq for GitHubChecks
impl PartialEq for GitHubChecks
Source§impl Serialize for GitHubChecks
impl Serialize for GitHubChecks
impl StructuralPartialEq for GitHubChecks
Auto Trait Implementations§
impl Freeze for GitHubChecks
impl RefUnwindSafe for GitHubChecks
impl Send for GitHubChecks
impl Sync for GitHubChecks
impl Unpin for GitHubChecks
impl UnsafeUnpin for GitHubChecks
impl UnwindSafe for GitHubChecks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.