Skip to content

refactor(slack): move configuration types into slack package#5239

Draft
santiagofn wants to merge 1 commit into
prometheus:mainfrom
santiagofn:refactor/slack-move-config
Draft

refactor(slack): move configuration types into slack package#5239
santiagofn wants to merge 1 commit into
prometheus:mainfrom
santiagofn:refactor/slack-move-config

Conversation

@santiagofn
Copy link
Copy Markdown
Contributor

@santiagofn santiagofn commented May 14, 2026

Part 2 of a series implementing threaded message support for the Slack notifier. Full picture (it might be outdated): #5150.

Summary

Moves SlackConfig and related types from config/notifiers.go into a new notify/slack/config.go, following the same pattern used recently for the mattermost, jira, and incidentio notifiers.

The Slack-specific unmarshal tests are moved alongside them into notify/slack/config_test.go. config.Receiver now refers to *slack.SlackConfig, and notify/slack no longer needs to import the top-level config package.

No behavioral changes.

Made with Cursor

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7dc6cd75-cb24-4faf-bf8f-9e7cfca5df50

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Moves SlackConfig (and the related SlackAction, SlackConfirmationField,
SlackField types plus DefaultSlackConfig) from config/notifiers.go into
a new notify/slack/config.go, following the same pattern used recently
for the mattermost, jira, and incidentio notifiers.

While moving them, the Slack prefix is dropped per the package-naming
guidance in https://go.dev/blog/package-names ("Avoid repetition"):
SlackConfig -> Config, DefaultSlackConfig -> DefaultConfig, SlackAction
-> Action, SlackConfirmationField -> ConfirmationField, SlackField ->
Field. External callers now refer to slack.Config etc., reading better
than the previous slack.SlackConfig stutter.

The Slack-specific unmarshal tests are moved alongside them into
notify/slack/config_test.go. config.Receiver now refers to
*slack.Config, and notify/slack no longer needs to import the top-level
config package.

No behavioral changes.

Signed-off-by: Santiago Fernández Núñez <santiago.nunez@nubank.com.br>
Co-authored-by: Cursor <cursoragent@cursor.com>
@santiagofn santiagofn force-pushed the refactor/slack-move-config branch from 80ffec1 to d485a65 Compare May 19, 2026 17:54
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.

1 participant