pub struct Check {
pub name: String,
pub status: String,
pub conclusion: Option<String>,
pub required: bool,
pub head: Option<Sha>,
pub url: Option<Url>,
pub started_at: Option<String>,
pub completed_at: Option<String>,
}Expand description
One check the host reports on a change request.
Fields§
§name: StringThe check’s name, as branch protection lists it.
status: StringWhere the check is: the host’s own status vocabulary, passed through.
conclusion: Option<String>How it ended, once it has. Absent while it is still running.
required: boolWhether it blocks the merge.
head: Option<Sha>The commit the host attached this check to, or None where the host did not
say which one it is about.
What makes a check’s verdict addressable to a commit rather than to a change
request. A change request is a moving target — every push gives it a new head,
and the host attaches the new head’s checks seconds to minutes later — so a
caller reading “the checks on this change request” moments after a push reads
the previous head’s answer and cannot tell. None is the host declining to
say and never a commit inferred from the change request: a caller that must
distinguish them has to be able to, and one that cannot is told nothing rather
than told wrongly.
Defaulted, so a check some earlier build serialized still reads — as one whose commit that build never recorded, which is what it is.
url: Option<Url>Where this check is on the host, so whoever is handed its refusal can go and
look at it. None where the host reported no address for it.
started_at: Option<String>When the host says this run of the check started, spelled as the host spelled
it, or None where it did not say.
The run’s own identity: a check re-run under the same name — the run a workflow starts when a draft is lifted — is a new run with a new start, even where it concludes exactly as the one before it did. That is what a publication tells a run the host attached after an early lift from the draft’s by, so it is compared for equality and never parsed or ordered: two clocks never meet in it.
Defaulted and omitted when empty, as head and url are, so a check an
earlier build serialized still reads and one without a start serializes as
it always did.
completed_at: Option<String>When the host says this run of the check completed, spelled as the host
spelled it, or None where it did not say — which is every run still going.
Carried for the record of a gate run and nothing else: a required-checks
run lists each required check with the times the host reported, so a reader
can tell a long check from a long wait for one. Never compared or ordered
here. Defaulted and omitted when empty, as started_at is, so a check an
earlier build serialized still reads.
Implementations§
Source§impl Check
impl Check
Sourcepub fn state(&self) -> CheckState
pub fn state(&self) -> CheckState
Which of the five states this check is in — the one classifier every reading and every rendering of a check follows.
A skipped check is its own state and never a passed one: a job a workflow
gated on the change not being a draft reports skipped without having run,
so reading it as green would call a change verified that nothing verified.
What the publication watch does with a skipped required check is its own
rule, stated where the watch is.
Sourcepub fn green(&self) -> bool
pub fn green(&self) -> bool
Whether a settled check passed. A skipped one did not: see Check::state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Check
impl<'de> Deserialize<'de> for Check
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>,
impl Eq for Check
impl StructuralPartialEq for Check
Auto Trait Implementations§
impl Freeze for Check
impl RefUnwindSafe for Check
impl Send for Check
impl Sync for Check
impl Unpin for Check
impl UnsafeUnpin for Check
impl UnwindSafe for Check
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.