Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `slack.failOnError` option to abort the pipeline when Slack notification operations fail ([#54](https://github.com/seqeralabs/nf-slack/pull/54))

## [0.5.1] - 2026-02-19

### Fixed
Expand Down
1 change: 1 addition & 0 deletions docs/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Complete API reference for nf-slack plugin configuration options and functions.
| `onComplete` | Closure | See [`slack.onComplete`](#slackoncomplete) | No | Configuration for workflow completion notifications |
| `onError` | Closure | See [`slack.onError`](#slackonerror) | No | Configuration for workflow error notifications |
| `validateOnStartup` | Boolean | `true` | No | Validate Slack connection credentials on pipeline startup |
| `failOnError` | Boolean | `false` | No | Abort the pipeline when a Slack notification operation fails |

\*Either `webhook` or `bot` is required. If neither is configured, the plugin will automatically disable itself.

Expand Down
16 changes: 16 additions & 0 deletions docs/usage/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,22 @@ slack {

This checks the token/webhook and channel access at pipeline start, failing fast if there's a configuration problem.

## Fail on Notification Errors

By default, Slack notification failures are logged and the pipeline continues. Set `failOnError = true` to abort the pipeline when any notification operation fails (messages, file uploads, reactions, or extension calls):

```groovy
slack {
bot {
token = System.getenv('SLACK_BOT_TOKEN')
channel = 'general'
}
failOnError = true
}
```

Reaction failures continue to log at `DEBUG` when `failOnError` is `false` (the default).

## What's Next

- [Examples](../examples/gallery.md) — Copy-paste configurations for common scenarios
Expand Down
1 change: 1 addition & 0 deletions example/configs/01-minimal.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {

slack {
enabled = true
// failOnError = true // Uncomment to abort the pipeline on notification failures
bot {
token = System.getenv('SLACK_BOT_TOKEN')
channel = System.getenv('SLACK_CHANNEL_ID')
Expand Down
Loading
Loading