corvix.notifications.targets.slack

Slack incoming-webhook notification target.

This is the built-in reference NotificationTarget implementation. It posts one Slack message per newly-arrived unread GitHub notification to a configured incoming-webhook URL. See docs/new_notification_target.md for how to add your own channel.

Attributes

Classes

SlackTarget

Posts a Slack message for each new GitHub notification.

Functions

_format_message(→ str)

Render a Slack message body for a single notification event.

Module Contents

corvix.notifications.targets.slack.logger[source][source]
corvix.notifications.targets.slack._DEFAULT_TIMEOUT_SECONDS = 5.0[source][source]
class corvix.notifications.targets.slack.SlackTarget[source][source]

Posts a Slack message for each new GitHub notification.

Parameters

webhook_url:

Slack incoming-webhook URL. Resolved from an env var by the CLI so the secret never lives in corvix.yaml.

enabled:

When False the target is a no-op (delivers nothing). The CLI already skips disabled targets, but this keeps the target safe to construct directly.

timeout_seconds:

Per-request HTTP timeout.

webhook_url: str[source][source]
enabled: bool = True[source][source]
timeout_seconds: float = 5.0[source][source]
property name: str[source][source]
deliver(events: list[corvix.notifications.models.NotificationEvent]) corvix.notifications.models.DeliveryResult[source][source]

Post one message per event; never raise (errors go in the result).

_post(text: str) None[source][source]
corvix.notifications.targets.slack._format_message(event: corvix.notifications.models.NotificationEvent) str[source][source]

Render a Slack message body for a single notification event.