Skip to main content

ListenCfg

Struct ListenCfg 

Source
pub struct ListenCfg {
    pub interval: u64,
    pub sweep: u64,
    pub settle: u64,
    pub max_wait: u64,
    pub max_rechecks: u32,
    pub on_review_requested: ReviewOrIgnore,
    pub on_assigned: ReviewOrIgnore,
    pub on_own_pr: OwnPr,
    pub verdicts: bool,
}
Expand description

What spar listen watches for and what it does about it. As with LoopCfg, every field takes its value from ListenCfg::default() when a config does not mention it.

Fields§

§interval: u64

Seconds between polls of GitHub’s notifications for the repository. GitHub says how often it will answer, and the larger of the two is used.

§sweep: u64

Seconds between sweeps of the open pull requests. The sweep sees what a notification can miss: a review asked for again, an assignment, a close, or a push, which raises no notification for a reviewer.

§settle: u64

Seconds an item has to stay quiet before spar acts on it, so a review request and three comments in the same minute cost one recheck rather than four.

§max_wait: u64

Most seconds an item may keep settling before it is acted on anyway.

§max_rechecks: u32

Rechecks one pull request gets before a person has to run spar review on it again. A cap against two bots arguing, not a target. 0 turns automatic rechecks off.

§on_review_requested: ReviewOrIgnore§on_assigned: ReviewOrIgnore§on_own_pr: OwnPr§verdicts: bool

Whether a review spar listen starts submits a formal verdict, approve or request changes, rather than a comment. A recheck always does.

Trait Implementations§

Source§

impl Clone for ListenCfg

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ListenCfg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ListenCfg

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ListenCfg

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ListenCfg

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.