feat: 支持按项目配置钉钉通知 @ 名单

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-11-03 09:59:05 +09:00
co-authored by Claude Opus 5.5
parent a4cd855b0c
commit 10c39b5116
7 changed files with 90 additions and 6 deletions
+7 -3
View File
@@ -23,7 +23,7 @@ from ..config import (
from ..projects import LEGACY_PROJECT_ID, PATCHER_READOOR, get_definition, get_project_source
from .log_streamer import log_streamer
from .distribution import DistributionError, publish_dsym, publish_ipa
from .notification import NotificationError, send_dingtalk_notification
from .notification import NotificationError, merge_project_at_mobiles, send_dingtalk_notification
from .project_patcher import ProjectPatchError, apply_project_config
@@ -553,9 +553,13 @@ async def run_build_task(task_id: str):
await log_streamer.emit(task_id, f"下载链接: {task.oss_url}")
# Ad Hoc 发安装页二维码通知,App Store 发 IPA 下载地址通知;
# 两者标题与 @ 名单不同,均由 send_dingtalk_notification 按 BUILD_TYPE 区分。
# 两者标题与 @ 名单不同,均由 send_dingtalk_notification 按 BUILD_TYPE 区分;
# 项目配置了 @ 名单时覆盖全局名单。
# 通知不影响已完成的打包结果,发送失败仅写入日志以便排查。
dingtalk_config = config_data.get("_upload_config", {}).get("dingtalk", {})
dingtalk_config = merge_project_at_mobiles(
config_data.get("_upload_config", {}).get("dingtalk", {}),
definition.get("dingtalk_at"),
)
try:
notified = await asyncio.to_thread(
send_dingtalk_notification,