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).
Prefer {{ .Env.WEBHOOK_URL }} for any URL containing a secret
token in its path / query string — plaintext values are NOT
redacted from error messages or dist/config.yaml after a
dry-run / snapshot run.
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
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 WebhookConfig
impl Debug for WebhookConfig
Source§impl Default for WebhookConfig
impl Default for WebhookConfig
Source§fn default() -> WebhookConfig
fn default() -> WebhookConfig
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>,
Source§impl JsonSchema for WebhookConfig
impl JsonSchema for WebhookConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more