fix: count DingTalk webhook as notification channel (#2230)

This commit is contained in:
mrlonely
2026-08-19 22:52:10 +08:00
committed by GitHub
parent b740beea2a
commit 5d3e4e374a
3 changed files with 11 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
<!-- 新条目格式:- [类型] 描述(类型取值:新功能/改进/修复/文档/测试/chore-->
<!-- 每条独立一行追加到本段末尾,无需分类标题,合并时冲突最小 -->
- [修复] 已配置钉钉 Webhook 时不再误报“未配置通知渠道”;钉钉 Stream 仍仅用于交互,不作为定时静态推送渠道。
- [改进] AIHubMix 注册与引流链接统一使用 inferera.com改善中国大陆网络直连体验。
- [修复] 单股推送模式在未配置通知渠道时仍会落盘本地个股报告CLI 启动分析若因空股票列表、个股结果全失败或本地报告保存失败而未生成报告,会显式返回失败并记录原因。
- [修复] 合并推送模式下即使个股汇总报告落盘失败,仍会先发送已有的合并通知;仅启用大盘复盘但最终未生成任何复盘内容时,分析任务会显式返回失败。

View File

@@ -3423,6 +3423,7 @@ class Config:
# --- Notification channels ---
has_notification = bool(
self.wechat_webhook_url
or self.dingtalk_webhook_url
or self.feishu_webhook_url
or (
(self.feishu_app_id or "")

View File

@@ -520,6 +520,15 @@ class TestValidateStructuredNotification:
issues = cfg.validate_structured()
assert not any(i.severity == "warning" and "通知渠道" in i.message for i in issues)
def test_dingtalk_webhook_counts_as_notification_channel(self):
cfg = _make_config(
wechat_webhook_url=None,
dingtalk_webhook_url="https://oapi.dingtalk.com/robot/send?access_token=test",
)
issues = cfg.validate_structured()
assert not any(i.severity == "warning" and "通知渠道" in i.message for i in issues)
@pytest.mark.parametrize(
("kwargs", "missing_field"),
[