pub struct PublishRequest {
pub policy: Option<MergePolicy>,
pub title: Option<Subject>,
pub body: Option<String>,
pub draft: Option<DraftReason>,
}Expand description
What one publication was asked for beyond the session it publishes.
The options onevcs publish takes, and nothing else: everything else about a
publication comes from the session and from the repository’s rules.
Fields§
§policy: Option<MergePolicy>A per-run policy. It may narrow the repository’s but never widen it.
title: Option<Subject>An explicit title, which replaces the subject synthesized from the branch.
body: Option<String>The body the change request is opened with, verbatim.
Absent opens it with no body at all. Nothing here composes one: every
change request this crate opened used to carry the same three lines — the
branch’s own subject echoed back under ## What, and Published by onevcs. under ## Why — which told a reviewer nothing the title had not.
Unvalidated, because a body is prose and a host places no shape on it; a
title is a Subject for the opposite reason.
draft: Option<DraftReason>Open the change request as a draft, and why it is not ready.
Absent is a publication giving no reason, which takes the draft lifecycle: its
change request opens as a draft while the required checks run and is lifted or
kept for review on their verdict — or opens ready, where the rules file says
drafts: {disabled: true}. Present is one of two things, and the reason
says which: a change whose work is as far along as it can go while something
outside this repository has not happened yet, or a change the session that
opened it is still making. The reason travels with it, because a draft
nobody can read the reason for is a change request nobody knows how to
finish.
A draft is unmergeable in that state, and this crate keeps it so: nothing
merges it, arms the host’s own merge on it, or advances a base from it while
the draft stands, under any drafts: setting. A later publication of the same
branch carrying no DraftReason adopts it as awaiting its checks and lifts
it only on their verdict, or keeps it for review; onevcs change ready lifts it
at once, for a session that wants its draft lifted without landing anything.
Trait Implementations§
Source§impl Clone for PublishRequest
impl Clone for PublishRequest
Source§impl Debug for PublishRequest
impl Debug for PublishRequest
Source§impl Default for PublishRequest
impl Default for PublishRequest
Source§impl<'de> Deserialize<'de> for PublishRequest
impl<'de> Deserialize<'de> for PublishRequest
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 PublishRequest
Source§impl PartialEq for PublishRequest
impl PartialEq for PublishRequest
Source§impl Serialize for PublishRequest
impl Serialize for PublishRequest
impl StructuralPartialEq for PublishRequest
Auto Trait Implementations§
impl Freeze for PublishRequest
impl RefUnwindSafe for PublishRequest
impl Send for PublishRequest
impl Sync for PublishRequest
impl Unpin for PublishRequest
impl UnsafeUnpin for PublishRequest
impl UnwindSafe for PublishRequest
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.