pub struct DiscordEventsConfig {
pub version_release: Option<bool>,
pub crates_io: Option<bool>,
pub npm: Option<bool>,
pub linear: Option<bool>,
pub cargo_dist: Option<bool>,
pub oci: Option<bool>,
}Expand description
Per-event toggles for Discord release/publish notifications.
Omitted keys default to enabled when a webhook URL is configured.
Set a key to false to silence that event type.
discord:
enabled: true
webhook_url: ${DISCORD_WEBHOOK_URL}
username: XBP
events:
version_release: true
crates_io: true
npm: true
linear: true
cargo_dist: true
oci: trueFields§
§version_release: Option<bool>Git tag + GitHub release completed (xbp version release).
crates_io: Option<bool>crates.io package publish succeeded.
npm: Option<bool>npmjs package publish succeeded.
linear: Option<bool>Linear initiative release post published.
cargo_dist: Option<bool>cargo-dist build / asset upload status.
oci: Option<bool>OCI image publish / deploy image verification.
Implementations§
Source§impl DiscordEventsConfig
impl DiscordEventsConfig
pub fn is_enabled(&self, event: DiscordNotifyEvent) -> bool
pub fn set_event(&mut self, event: DiscordNotifyEvent, enabled: bool)
Trait Implementations§
Source§impl Clone for DiscordEventsConfig
impl Clone for DiscordEventsConfig
Source§fn clone(&self) -> DiscordEventsConfig
fn clone(&self) -> DiscordEventsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiscordEventsConfig
impl Debug for DiscordEventsConfig
Source§impl Default for DiscordEventsConfig
impl Default for DiscordEventsConfig
Source§fn default() -> DiscordEventsConfig
fn default() -> DiscordEventsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DiscordEventsConfig
impl<'de> Deserialize<'de> for DiscordEventsConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DiscordEventsConfig
Source§impl PartialEq for DiscordEventsConfig
impl PartialEq for DiscordEventsConfig
Source§impl Serialize for DiscordEventsConfig
impl Serialize for DiscordEventsConfig
impl StructuralPartialEq for DiscordEventsConfig
Auto Trait Implementations§
impl Freeze for DiscordEventsConfig
impl RefUnwindSafe for DiscordEventsConfig
impl Send for DiscordEventsConfig
impl Sync for DiscordEventsConfig
impl Unpin for DiscordEventsConfig
impl UnsafeUnpin for DiscordEventsConfig
impl UnwindSafe for DiscordEventsConfig
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more