pub struct ChangeSpec {
pub head: String,
pub base: String,
pub title: String,
pub body: Option<String>,
pub draft: Option<DraftReason>,
pub draft_awaiting_checks: bool,
}Expand description
What to open a change request for.
Fields§
§head: StringThe branch carrying the change.
base: StringThe branch it targets, which for a stacked change is the branch below it.
title: StringThe title, which under squash-merge becomes the commit subject.
body: Option<String>The body. Absent means the host’s default from the repository template.
draft: Option<DraftReason>Open it as a draft, and why it is not ready. Absent opens an ordinary change request, which is every publication that came before this field.
The host is handed the whole reason and asked for one thing with it: open the
change as a draft. Nothing here renders the reason into the change request —
see DraftReason for the ruling that keeps it out of the body — so a host
implementation that reads past this field’s presence is reading further than
the contract asks it to.
draft_awaiting_checks: boolOpen it as a draft while its required checks run, with no
DraftReason: what a lifecycle publication asks for when its caller asked
for no draft. A host lifts or keeps it once the checks settle, by the rules
the publication states; nothing here is a reason a caller gave.
Beside draft rather than a third kind of it, because DraftReason is what
a caller asks for and this is what the lifecycle asks for when the caller
asked for none. Defaulted and omitted when false, so a spec written before it
reads and writes as it did. Where both are set the reason is what the host
records: either way the change opens as a draft.
Trait Implementations§
Source§impl Clone for ChangeSpec
impl Clone for ChangeSpec
Source§impl Debug for ChangeSpec
impl Debug for ChangeSpec
Source§impl<'de> Deserialize<'de> for ChangeSpec
impl<'de> Deserialize<'de> for ChangeSpec
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 ChangeSpec
Source§impl PartialEq for ChangeSpec
impl PartialEq for ChangeSpec
Source§impl Serialize for ChangeSpec
impl Serialize for ChangeSpec
impl StructuralPartialEq for ChangeSpec
Auto Trait Implementations§
impl Freeze for ChangeSpec
impl RefUnwindSafe for ChangeSpec
impl Send for ChangeSpec
impl Sync for ChangeSpec
impl Unpin for ChangeSpec
impl UnsafeUnpin for ChangeSpec
impl UnwindSafe for ChangeSpec
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.