pub struct WebhookConfig {
pub enabled: Option<StringOrBool>,
pub endpoint_url: Option<String>,
pub headers: Option<HashMap<String, String>>,
pub content_type: Option<String>,
pub message_template: Option<String>,
pub skip_tls_verify: Option<bool>,
pub expected_status_codes: Vec<u16>,
}Fields§
§enabled: Option<StringOrBool>Enable generic webhook announcements (supports template expressions).
endpoint_url: Option<String>Webhook endpoint URL (supports template variables).
headers: Option<HashMap<String, String>>Custom HTTP headers to include in the request.
Precedence — anodizer diverges from GoReleaser here:
- anodizer: a config-supplied
Authorizationheader wins over theBASIC_AUTH_HEADER_VALUE/BEARER_TOKEN_HEADER_VALUEenv var. - GoReleaser (webhook.go:104-115): env-supplied
Authorizationis appended FIRST; most servers honour the first occurrence, so the env value effectively wins.
Migrating configs that relied on env-overriding the config header
must either remove the config entry or be reconfigured. Use
templated config (Authorization: "Bearer {{ .Env.MY_TOKEN }}") for
the cleanest migration.
content_type: Option<String>Content-Type header value. Default: “application/json”.
message_template: Option<String>Message body template. Default: “{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}”
skip_tls_verify: Option<bool>When true, skip TLS certificate verification for the webhook endpoint.
expected_status_codes: Vec<u16>HTTP status codes to accept as success (default: [200, 201, 202, 204]).
Trait Implementations§
Source§impl Clone for WebhookConfig
impl Clone for WebhookConfig
Source§fn clone(&self) -> WebhookConfig
fn clone(&self) -> WebhookConfig
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 WebhookConfig
impl Debug for WebhookConfig
Source§impl Default for WebhookConfig
impl Default for WebhookConfig
Source§fn default() -> WebhookConfig
fn default() -> WebhookConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WebhookConfigwhere
WebhookConfig: Default,
impl<'de> Deserialize<'de> for WebhookConfigwhere
WebhookConfig: Default,
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
Source§impl JsonSchema for WebhookConfig
impl JsonSchema for WebhookConfig
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for WebhookConfig
impl RefUnwindSafe for WebhookConfig
impl Send for WebhookConfig
impl Sync for WebhookConfig
impl Unpin for WebhookConfig
impl UnsafeUnpin for WebhookConfig
impl UnwindSafe for WebhookConfig
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