also looking at this
feat(events): one notification story — fire every declared event, trim setup to its real job
#1449
14 files
+308
-81
| @@ -379,7 +379,7 @@ const result = await migrator.migrateFromRenovate('renovate.json') | ||
| 379 | 379 | |
| 380 | 380 | ## Integration Ecosystem |
| 381 | 381 | |
| 382 | Buddy includes an extensible plugin system that enables integrations with popular collaboration and project management tools. | |
| 382 | Buddy includes a setup-time plugin system that notifies your collaboration tools when `buddy setup` completes. (Runtime events — scans, pull requests, merges — go through the `notifications` key in `buddy.config.ts` instead; that is the system a new integration should hook into.) | |
| 383 | 383 | |
| 384 | 384 | ### Built-in Integrations |
| 385 | 385 | |
| @@ -397,8 +397,7 @@ echo "https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" > .buddy/slack-webhoo | ||
| 397 | 397 | |
| 398 | 398 | - Rich setup completion notifications |
| 399 | 399 | - Repository and project details |
| 400 | - Error notifications for setup failures | |
| 401 | - Configurable channel and username | |
| 400 | - Reads the webhook from the env var, or from the `.buddy/slack-webhook` file | |
| 402 | 401 | |
| 403 | 402 | #### Discord Integration |
| 404 | 403 | |
| @@ -444,8 +443,7 @@ Create custom integrations by defining plugins in `.buddy/plugins/`: | ||
| 444 | 443 | "version": "1.0.0", |
| 445 | 444 | "enabled": true, |
| 446 | 445 | "triggers": [ |
| 447 | { "event": "setup_complete" }, | |
| 448 | { "event": "validation_error" } | |
| 446 | { "event": "setup_complete" } | |
| 449 | 447 | ], |
| 450 | 448 | "hooks": [ |
| 451 | 449 | { |
| @@ -470,13 +468,14 @@ hooks run, and the plugin file chooses the URL. | ||
| 470 | 468 | |
| 471 | 469 | ### Plugin Events |
| 472 | 470 | |
| 473 | | Event | Description | Context | | |
| 474 | |-------|-------------|---------| | |
| 475 | | `pre_setup` | Before setup begins | Initial configuration | | |
| 476 | | `post_setup` | After setup completes | Full setup context | | |
| 477 | | `step_complete` | After each setup step | Step-specific progress | | |
| 478 | | `validation_error` | When validation fails | Error details and recovery | | |
| 479 | | `setup_complete` | Final setup completion | Complete project context | | |
| 471 | Setup fires exactly one event: **`setup_complete`**, once, when setup finishes | |
| 472 | — in interactive and non-interactive runs alike. Triggers naming anything else | |
| 473 | still load (files written against the retired `pre_setup` / `post_setup` / | |
| 474 | `step_complete` / `validation_error` vocabulary are tolerated) but never fire. | |
| 475 | ||
| 476 | For runtime notifications — scans, pull requests, merges — use the | |
| 477 | `notifications` key in `buddy.config.ts`: an exported webhook env var alone | |
| 478 | does nothing at runtime. | |
| 480 | 479 | |
| 481 | 480 | ### Programmatic Usage |
| 482 | 481 | |