Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an optional Slack channel override so Uguisu can post notifications to a configurable channel (useful for testing/deploying parallel instances).
Changes:
- Add
SLACK_CHANNELenv var support toUguisuand pass it into the Slack service. - Extend Slack service constructor to accept a channel and include it in the webhook payload.
- Update Slack service tests and add coverage for the channel override behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| uguisu.go | Adds SLACK_CHANNEL configuration and wires it into Slack service creation. |
| pkg/service/slack.go | Extends Slack service to store an optional channel and include it in slack.WebhookMessage. |
| pkg/service/slack_test.go | Updates constructor calls and adds a test ensuring the channel appears in the payload. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SlackWebhookURL string `env:"SLACK_WEBHOOK_URL"` | ||
| SlackChannel string `env:"SLACK_CHANNEL"` | ||
| DisabledRules string `env:"DISABLED_RULES"` |
There was a problem hiding this comment.
SLACK_CHANNEL is now read from the environment, but there are no other references in the repo that set or pass this variable (e.g., the CDK stack only sets SLACK_WEBHOOK_URL). If CDK is the standard deployment path, add an optional stack argument and propagate it to the Lambda environment so the new channel override can actually be configured without manual console edits.
64a7dc9 to
d1873d7
Compare
|
I don't think I will need this, I just created a new webhook targeting a different channel |
For testing purposes I would like to be able to launch a new instance that posts to a different channel.
This change optionally allows uguisu to be configured with a slack channel where notifications should be sent to.