fix: App_Store 钉钉通知因缺少关键词「打包」被拦截,标题改回含「打包」
钉钉机器人启用了自定义关键词校验。9ace2c8 将 App_Store 标题改为 「【iOS】App_Store 包信息」,丢掉了「打包」二字,导致消息被钉钉拒收 (errmsg: 关键词不匹配),任务日志出现「钉钉通知未发送」。 标题改回「【iOS】App_Store 打包信息」,重新包含关键词;测试同步更新。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FETBaqMgRqx3kdpzccKg1
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9ace2c8aca
commit
dae14a8a10
@@ -52,7 +52,8 @@ def build_dingtalk_payload(
|
|||||||
"""生成与 AutoPacking/upload_iap.py 一致的钉钉 Markdown 内容。"""
|
"""生成与 AutoPacking/upload_iap.py 一致的钉钉 Markdown 内容。"""
|
||||||
mobiles = _normalize_mobiles(at_mobiles)
|
mobiles = _normalize_mobiles(at_mobiles)
|
||||||
# App_Store 包与 Ad Hoc 用不同标题,App_Store 只有 IPA 下载地址、无二维码。
|
# App_Store 包与 Ad Hoc 用不同标题,App_Store 只有 IPA 下载地址、无二维码。
|
||||||
heading = "【iOS】App_Store 包信息" if config_data.get("BUILD_TYPE") == "App_Store" else "【iOS】打包信息"
|
# 标题必须保留「打包」二字:钉钉机器人启用了自定义关键词,缺少关键词会被拒收。
|
||||||
|
heading = "【iOS】App_Store 打包信息" if config_data.get("BUILD_TYPE") == "App_Store" else "【iOS】打包信息"
|
||||||
details = (
|
details = (
|
||||||
f"**环境:** {config_data.get('SERVER', '')}\n\n"
|
f"**环境:** {config_data.get('SERVER', '')}\n\n"
|
||||||
f"**版本:** {config_data.get('VERSION', '')}\n\n"
|
f"**版本:** {config_data.get('VERSION', '')}\n\n"
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ def test_dingtalk_payload_app_store_heading_and_no_qr():
|
|||||||
config, "https://oss.example.com/readoor/iOS/app_2_197_1.ipa"
|
config, "https://oss.example.com/readoor/iOS/app_2_197_1.ipa"
|
||||||
)
|
)
|
||||||
text = payload["markdown"]["text"]
|
text = payload["markdown"]["text"]
|
||||||
assert "## 【iOS】App_Store 包信息" in text
|
# 标题保留「打包」二字,避免命中钉钉自定义关键词拦截
|
||||||
assert "## 【iOS】打包信息" not in text
|
assert "## 【iOS】App_Store 打包信息" in text
|
||||||
assert "**iOS 下载链接:** https://oss.example.com/readoor/iOS/app_2_197_1.ipa" in text
|
assert "**iOS 下载链接:** https://oss.example.com/readoor/iOS/app_2_197_1.ipa" in text
|
||||||
assert "![image]" not in text
|
assert "![image]" not in text
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ def test_dingtalk_notification_app_store_uses_own_at_list():
|
|||||||
|
|
||||||
sent = post.call_args.kwargs["json"]
|
sent = post.call_args.kwargs["json"]
|
||||||
assert sent["at"]["atMobiles"] == ["13911111111", "13922222222"]
|
assert sent["at"]["atMobiles"] == ["13911111111", "13922222222"]
|
||||||
assert "## 【iOS】App_Store 包信息" in sent["markdown"]["text"]
|
assert "## 【iOS】App_Store 打包信息" in sent["markdown"]["text"]
|
||||||
assert "@13800000000" not in sent["markdown"]["text"]
|
assert "@13800000000" not in sent["markdown"]["text"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user