Skip to content

Optionally allow slack channel to be configured - #41

Closed
errm wants to merge 1 commit into
masterfrom
errm/configure-slack-channel
Closed

errm wants to merge 1 commit into
masterfrom
errm/configure-slack-channel

Conversation

@errm

@errm errm commented Mar 20, 2026

Copy link
Copy Markdown
Member

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.

@errm
errm requested review from bermannoah and Copilot and removed request for Copilot March 20, 2026 10:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CHANNEL env var support to Uguisu and 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.

Comment thread uguisu.go
Comment on lines 40 to 42
SlackWebhookURL string `env:"SLACK_WEBHOOK_URL"`
SlackChannel string `env:"SLACK_CHANNEL"`
DisabledRules string `env:"DISABLED_RULES"`

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@errm this seems sensible to me, no?

Comment thread uguisu.go Resolved
@errm
errm force-pushed the errm/configure-slack-channel branch from 64a7dc9 to d1873d7 Compare March 20, 2026 12:22
@errm

errm commented Mar 24, 2026

Copy link
Copy Markdown
Member Author

I don't think I will need this, I just created a new webhook targeting a different channel

@errm errm closed this Mar 24, 2026
@errm
errm deleted the errm/configure-slack-channel branch March 24, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants