Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add failed_member_ids #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
whxxxxxxxxxx merged 1 commit into main from add-ids
Sep 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions consultingapis/dingtalk/v1/dingtalk.proto
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,5 @@ message CreateRecruitChatGroupResponse{
string chat_id = 1;
string openConversationId = 2;
string invite_url = 3;
string failed_member_ids = 4;
Copy link

@coderabbitai coderabbitai bot Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

🧩 Analysis chain

将 failed_member_ids 改为 repeated 字段,避免非结构化返回

该字段语义是"多个失败成员 ID"。用 string 会迫使客户端自行解析(逗号分隔/JSON 等),且与请求体里 Body.member_idrepeated string 不对称。建议直接返回列表,便于多语言 SDK 生成强类型集合。

应用如下变更:

-message CreateRecruitChatGroupResponse{
+message CreateRecruitChatGroupResponse{
 string chat_id = 1;
 string openConversationId = 2;
 string invite_url = 3;
- string failed_member_ids = 4;
+ repeated string failed_member_ids = 4; // 添加失败的成员ID列表
 }

请在本仓库跑一遍代码生成并检索调用点,确认下游未假定为字符串:


🏁 Script executed:

#!/bin/bash
# 验证响应结构体/字段的使用点(Go/TS/Java 常见后缀做个基本覆盖)
rg -n -C2 'CreateRecruitChatGroupResponse|failed_member_ids' -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**'

Length of output: 148


重新运行更全面的搜索并打印相关 proto 片段:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "工作目录: $(pwd)"
echo "---- 全库搜索 CreateRecruitChatGroupResponse / failed_member_ids ----"
rg -n -S --hidden --no-ignore-vcs 'CreateRecruitChatGroupResponse|failed_member_ids|failedMemberIds|FailedMemberIds' || true
echo "---- 打印 consultingapis/dingtalk/v1/dingtalk.proto(如存在,前 240 行) ----"
if [ -f consultingapis/dingtalk/v1/dingtalk.proto ]; then
 sed -n '1,240p' consultingapis/dingtalk/v1/dingtalk.proto || true
else
 echo "文件 consultingapis/dingtalk/v1/dingtalk.proto 未找到"
fi
echo "---- 在所有 .proto 中查找消息定义 ----"
rg -n --hidden --no-ignore-vcs 'message CreateRecruitChatGroupResponse' -g '**/*.proto' || true
echo "---- 在常见生成文件中查找字段用法(.pb.go, .ts, .java, .js) ----"
rg -n --hidden --no-ignore-vcs 'CreateRecruitChatGroupResponse|failed_member_ids|failedMemberIds|FailedMemberIds' -g '**/*.pb.go' -g '**/*.ts' -g '**/*.js' -g '**/*.java' || true

Length of output: 9098


将 failed_member_ids 改为 repeated string 并同步更新生成产物

理由:字段语义为"多个失败成员 ID",应与请求体 Body.member_id (repeated string) 对齐,避免客户端自行解析。

仓库检索结果:该字段目前只出现在 consultingapis/dingtalk/v1/dingtalk.proto(当前为 string)及生成产物 consultingapis/dingtalk/v1/dingtalk.pb.go、consultingapis/dingtalk/v1/dingtalk_grpc.pb.go、docs/swagger/consultingapis/dingtalk/v1/dingtalk.swagger.json,未发现其他业务代码直接依赖字符串格式。风险在于必须同步重新生成产物并提交。

操作(必做):

  • 修改 proto(见下 diff)。
  • 重新运行 protoc / 生成脚本,提交更新的 .pb.go、_grpc.pb.go 与 swagger/json,并在修改后再次全库搜索与编译/测试确认无破坏。
-message CreateRecruitChatGroupResponse{
+message CreateRecruitChatGroupResponse{
 string chat_id = 1;
 string openConversationId = 2;
 string invite_url = 3;
- string failed_member_ids = 4;
+ repeated string failed_member_ids = 4; // 添加失败的成员ID列表
 }
📝 Committable suggestion

!!️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
string failed_member_ids = 4;
messageCreateRecruitChatGroupResponse{
string chat_id = 1;
string openConversationId = 2;
string invite_url = 3;
repeated string failed_member_ids = 4; // 添加失败的成员ID列表
}

}
Loading

AltStyle によって変換されたページ (->オリジナル) /