Skip to content

refactor(telegram): move configuration types into telegram package#5387

Open
TheMeier wants to merge 1 commit into
prometheus:mainfrom
TheMeier:telegram_config
Open

refactor(telegram): move configuration types into telegram package#5387
TheMeier wants to merge 1 commit into
prometheus:mainfrom
TheMeier:telegram_config

Conversation

@TheMeier

Copy link
Copy Markdown
Contributor

Pull Request Checklist

Which user-facing changes does this PR introduce?

NONE

Signed-off-by: Christoph Maser <christoph.maser+github@gmail.com>
@TheMeier TheMeier requested a review from a team as a code owner July 14, 2026 18:24
@TheMeier

Copy link
Copy Markdown
Contributor Author

On this one I had to trim the tests a bit, since it was cross cutting testing the golbal config merging. A topic I want to adress with a comon interface for merging global configs in the future.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 70d73805-8343-4217-88e9-e1b3ed4172d1

📥 Commits

Reviewing files that changed from the base of the PR and between 3d96a34 and 3b91b36.

📒 Files selected for processing (7)
  • config/config.go
  • config/notifiers.go
  • config/notifiers_test.go
  • notify/telegram/config.go
  • notify/telegram/config_test.go
  • notify/telegram/telegram.go
  • notify/telegram/telegram_test.go
💤 Files with no reviewable changes (2)
  • config/notifiers_test.go
  • config/notifiers.go

📝 Walkthrough

Walkthrough

Telegram configuration definitions and validation move into notify/telegram. Receiver decoding and Telegram notifier tests are updated to use the relocated type directly, while existing notification behavior remains unchanged.

Changes

Telegram configuration migration

Layer / File(s) Summary
Telegram configuration definition and validation
config/notifiers.go, config/notifiers_test.go, notify/telegram/config.go, notify/telegram/config_test.go
Telegram defaults, fields, YAML validation, and tests move from config to notify/telegram.
Receiver configuration type wiring
config/config.go
Receiver.TelegramConfigs now uses telegram.TelegramConfig.
Notifier consumer and test migration
notify/telegram/telegram.go, notify/telegram/telegram_test.go
The notifier and its tests use the local configuration type directly while retaining existing notification and retry scenarios.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving Telegram configuration types into the telegram package.
Description check ✅ Passed The description follows the template well enough, includes the checklist and explicitly states there are no user-facing changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

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