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¶
Posts a Slack message for each new GitHub notification. |
Functions¶
|
Render a Slack message body for a single notification event. |
Module Contents¶
- 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
Falsethe 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.
- 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).
- corvix.notifications.targets.slack._format_message(event: corvix.notifications.models.NotificationEvent) str[source][source]¶
Render a Slack message body for a single notification event.