NotificationConfig class

A single entry of the top level notifications: section.

Notifications are delivered once, after every task has finished, and receive the run summary. Modelling them at run level rather than as a job is what makes on: failure possible: a job placed after a failing build would never be reached.

notifications:
  - provider: slack
    webhook-url: "${{SLACK_WEBHOOK}}"
    on: always
    title: "Android release"

Constructors

NotificationConfig({required NotifyProvider provider, required String webhookUrl, NotifyOn on = NotifyOn.always, String? title, String? message, String? chatId})
Creates a notification entry.
NotificationConfig.fromJson(Map<String, dynamic> json)
Builds a notification from its YAML mapping.
factory

Properties

chatId → String?
Telegram chat identifier. Required for NotifyProvider.telegram.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String?
Optional message replacing the generated summary entirely.
final
on → NotifyOn
Condition under which the notification fires.
final
provider → NotifyProvider
Target chat platform.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String?
Optional heading prepended to the generated summary.
final
webhookUrl → String
Endpoint the payload is posted to.
final

Methods

buildPayload(String text) → Map<String, dynamic>
Renders the request body for provider.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serialises the entry back to its YAML shape.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited