实现 Issue #148: 对于一次性提交多个Review Comments的场景,我们当前的实现没有判断事件类型为 "submited",会导致重复触发AI任务 #149
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
改动摘要
修复了PR review事件处理中缺少
action
类型判断的bug。现在只有当事件类型为"submitted"
时才会触发AI任务,避免了在编辑或其他操作时重复触发。具体改动
/workspace/internal/webhook/handler.go
handlePRReview
函数 (第280-295行)action := event.GetAction()
获取事件动作类型"submitted"
事件"submitted"
事件会被忽略并记录调试日志这个修复确保了只有在用户正式提交review时才会触发AI批量处理任务,避免了在创建、编辑或其他操作review时的重复触发。
AI 完整输出
改动摘要
修复了PR review事件处理中缺少
action
类型判断的bug。现在只有当事件类型为"submitted"
时才会触发AI任务,避免了在编辑或其他操作时重复触发。具体改动
/workspace/internal/webhook/handler.go
handlePRReview
函数 (第280-295行)action := event.GetAction()
获取事件动作类型"submitted"
事件"submitted"
事件会被忽略并记录调试日志这个修复确保了只有在用户正式提交review时才会触发AI批量处理任务,避免了在创建、编辑或其他操作review时的重复触发。
原始 Prompt
根据Issue修改代码:
标题:对于一次性提交多个Review Comments的场景,我们当前的实现没有判断事件类型为 "submited",会导致重复触发AI任务
描述:如题,请帮修复这个bug。
输出格式:
改动摘要
简要说明改动内容
具体改动