-
feat(scheduler): add Rocket.Chat as a cron delivery provider (#4130)
发布于
2026-07-18 12:18:21 +00:00 | 1030 次提交 在此版本后已推送到 main- feat(scheduler): add Rocket.Chat as a cron delivery provider
Add rocketchat to the scheduler provider surface, mirroring the
existing telegram/slack/discord providers:- Provider.ROCKETCHAT enum value and cron CLI --provider choice
- resolve_rocketchat_credentials with the standard priority
(task.params > integration store > env), resolved per key so token
mode (server_url/auth_token/user_id) and webhook mode (webhook_url)
are both surfaced - _deliver_rocketchat posts the report to the task's chat_id channel
via chat.postMessage, stripping HTML and truncating to the shared
4096-char limit; scheduled tasks always target an explicit chat_id,
so token credentials are required — a webhook-only setup fails with
a clear error instead of silently delivering to the webhook's fixed
destination - docs: cron provider references and a scheduled-deliveries section
on the Rocket.Chat messaging page - tests: credential resolution across all priorities (isolated from
local store/env state), executor routing, HTML stripping, and the
webhook-only failure path
Fixes #4128
- fix(ci): register the scheduler->rocketchat delivery edge in the layer baseline
The strict layer contract forbids platform -> integrations imports;
the existing scheduler providers (discord/slack/telegram) are
grandfathered in the T-4 ignore_imports baseline. Add the matching
entry for the new rocketchat provider edge, same debt bucket.- docs(cron): fix credential resolution priority order
The list said integration store > env > task params, but
_resolve_credentials checks task params first, then the store, then
env — as the resolver docstrings already state. Flagged by review on
the adjacent Rocket.Chat edit.- test(scheduler): assert Provider.ROCKETCHAT enum value
Co-authored-by: muddlebee anweshknayak@gmail.com
下载附件