@paasman/webhooks
v0.2.0
Published
Webhook notifications for Paasman deployment events
Maintainers
Readme
@paasman/webhooks
Webhook notifications for Paasman deployment events. Supports Slack, Discord, and generic JSON payloads.
Install
npm install @paasman/webhooksUsage
import { WebhookManager } from '@paasman/webhooks'
const webhooks = new WebhookManager([
{ url: 'https://hooks.slack.com/services/xxx', format: 'slack', events: ['deploy'] },
{ url: 'https://discord.com/api/webhooks/xxx', format: 'discord', events: ['deploy', 'stop'] },
])
await webhooks.notify({
event: 'deploy',
profile: 'prod',
provider: 'coolify',
app: { id: 'abc-123', name: 'my-app' },
})Configuration
Add webhooks to ~/.paasman/config.yaml:
webhooks:
- url: https://hooks.slack.com/services/xxx
format: slack
events: [deploy, stop, restart]Formats
generic— Raw JSON payloadslack— Slack Block Kit messagediscord— Discord embed message
License
MIT
