pub struct PublishRequest {
pub policy: Option<MergePolicy>,
pub title: Option<Subject>,
pub body: Option<String>,
pub draft: Option<DraftReason>,
pub term_scope: TermScope,
pub defer_checks: bool,
pub adopt: Option<Url>,
}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.
term_scope: TermScopeWhich private repositories the public boundary check derives its terms from, should the destination be public. Unset is every registered private one.
defer_checks: boolPush into the draft adopt names and stop there:
no host call at all — no lookup, no description write, no check watch, no
lift — ending PublishOutcome::ChangeReviewDraftUnchecked. Its checks’ verdict
is read later, through change_standings or
review_standings.
Only for a change request held for review — a change-open identity whose
approvals are required — and only with adopt; refused otherwise, with nothing
pushed. Defaulted and omitted when false, so a request written before it reads
and writes as it did.
adopt: Option<Url>The change request a defer_checks publication
pushes into, which is never looked up on the host: its head branch is read from
this host’s own newest record of it — a standings read that saw its head, or the
change-opened a publication wrote — and must be the session’s branch.
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.