pub enum ReviewAction {
Auto,
Pr,
Viewer(Option<String>),
}Expand description
A project’s review medium (DESIGN.md §8/§11a): which of the two media the
unified pr action uses to get a review task’s diff in front of the
operator. Stored on the project (projects.review_action).
Variants§
Auto
Resolve at use: GitHub when the checkout is a GitHub repo, otherwise the configured viewer. Stored as NULL — the unconfigured default.
Pr
Always the GitHub PR flow (jump to the tracked PR, or push and create).
Viewer(Option<String>)
Always a local viewer from voro.toml: the named [viewers.<name>]
when one is given, otherwise the default viewer.
Implementations§
Source§impl ReviewAction
impl ReviewAction
Sourcepub fn parse(s: &str) -> Result<ReviewAction>
pub fn parse(s: &str) -> Result<ReviewAction>
Parse the stored/CLI form: auto, pr, viewer, or viewer:<name>.
Sourcepub fn resolve(&self, on_github: bool) -> ReviewMedium
pub fn resolve(&self, on_github: bool) -> ReviewMedium
Resolve the medium once the checkout’s GitHub-ness is known. Only Auto
consults the probe’s answer.
Sourcepub fn needs_probe(&self) -> bool
pub fn needs_probe(&self) -> bool
Whether resolving this action needs the GitHub probe at all, so
callers can skip the gh shell-out when the medium is pinned.
Trait Implementations§
Source§impl Clone for ReviewAction
impl Clone for ReviewAction
Source§fn clone(&self) -> ReviewAction
fn clone(&self) -> ReviewAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReviewAction
impl Debug for ReviewAction
Source§impl Default for ReviewAction
impl Default for ReviewAction
Source§fn default() -> ReviewAction
fn default() -> ReviewAction
Source§impl Display for ReviewAction
impl Display for ReviewAction
impl Eq for ReviewAction
Source§impl FromSql for ReviewAction
impl FromSql for ReviewAction
Source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Source§impl PartialEq for ReviewAction
impl PartialEq for ReviewAction
impl StructuralPartialEq for ReviewAction
Source§impl ToSql for ReviewAction
impl ToSql for ReviewAction
Source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Auto writes NULL — absence of configuration — so the column stays
empty until the operator pins a medium.
Auto Trait Implementations§
impl Freeze for ReviewAction
impl RefUnwindSafe for ReviewAction
impl Send for ReviewAction
impl Sync for ReviewAction
impl Unpin for ReviewAction
impl UnsafeUnpin for ReviewAction
impl UnwindSafe for ReviewAction
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,
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
key and return true if they are equal.