Skip to content

fix: remove unused configPath parameter from loadReviewers()#113

Merged
Svtter merged 1 commit into
mainfrom
fix/remove-unused-configpath-param
May 25, 2026
Merged

fix: remove unused configPath parameter from loadReviewers()#113
Svtter merged 1 commit into
mainfrom
fix/remove-unused-configpath-param

Conversation

@Svtter
Copy link
Copy Markdown
Collaborator

@Svtter Svtter commented May 25, 2026

Problem

From #110 — 移除 loadReviewers() 未使用的 configPathteam 参数。

经核实:

  • configPath — 确实是幽灵参数。函数体从未引用 opts.configPath,所有 reviewer 均从内置目录 actionPath/reviewers/ 加载,不存在从自定义路径加载的逻辑。
  • team不是幽灵参数。第 42 行 opts.team || env("MULTI_REVIEW_DEFAULT_TEAM") || DEFAULT_TEAM 直接使用了 opts.team。issue 描述有误。

Fix

仅删除 configPath 参数声明。唯一调用方 index.ts:27 只传 { actionPath },无需改动。

构建产物 (dist/index.cjs) 不受影响,因为该参数从未被引用过。

Refs #110

configPath was declared in the function signature but never referenced
in the body — all reviewers are loaded from the built-in directory
(actionPath/reviewers/). The sole call site (index.ts) only passes
{ actionPath }, confirming the parameter is dead.

Also clarified in the issue that `team` is NOT a ghost parameter — it
is actively used on line 42 for team resolution.

Refs: #110
@github-actions
Copy link
Copy Markdown

无遗漏

PR 范围内实现完整。Issue #110 声称 configPathteam 均为幽灵参数,PR 作者核实后确认 team 在第 41 行确实被使用(opts.team || env(...) || DEFAULT_TEAM),因此仅删除 configPath 参数声明,改动正确且完整。调用方 index.ts:27 仅传 { actionPath },无需修改。Issue #110 中的其他改进项(超时逻辑、异常处理、拆分职责等)不在本 PR 声明的范围内,不构成遗漏。

New%20session%20-%202026-05-25T03%3A13%3A46.130Z
opencode session  |  github run

@github-actions
Copy link
Copy Markdown

最终决策:可合并

本次 PR 移除 loadReviewers 未使用的 configPath 参数,4 位 reviewer 均确认无阻塞项或建议项。清理死代码的简单重构,接口暴露减少,调用方不受影响。

  • 阻塞项:无
  • 建议项:无

📋 各 Reviewer 详细审查结果
quality

可合并

本次 PR 删除 loadReviewers() 参数类型中未使用的 configPath 字段,属清理死代码的简单重构。

  • configPath 在函数体内从未被引用,grep 确认整个 multi-review/ 下无可达使用
  • 唯一调用方 src/index.ts:27 传参 { actionPath },不受影响
  • 无测试文件引用该参数,dist 为 JS 无类型约束亦无需调整

阻塞项:无
建议项:无

security

安全无虞

本次 PR 仅移除了 loadReviewers 函数签名中一个可选的 configPath 参数,未引入任何新的代码逻辑或功能变更。该改动不涉及用户输入处理、认证授权、注入攻击面、敏感数据暴露或不安全依赖等问题,对安全性无影响。

阻塞项:无

建议项:无

performance

性能良好

本次 PR 仅移除了 loadReviewers 函数中未使用的 configPath 参数,不涉及任何算法、内存、数据库查询、缓存或并发逻辑的变更。移除未使用参数不会对性能产生任何影响,反而略微减少了调用时的参数传递开销。

阻塞项:无

建议项:无

architecture

架构合理

移除 loadReviewersopts.configPath 未使用参数,属于清理死代码的正向重构。

  • 耦合:减少接口暴露,调用方无需传递无用参数,耦合度降低。
  • 模块位置:修改仅限 multi-review/src/reviewers.ts 一处,范围精准。
  • 分层:不影响领域边界,调用方 index.ts 原本也未传递该参数。
  • 接口设计:API 表面积缩减,避免虚假依赖和调用方困惑。
  • 霰弹式修改:单文件单行改动,高度局部化。
  • 一致性:与项目中清理未使用参数/选项的既有实践一致。

阻塞项:无

建议项:无

@Svtter Svtter merged commit 238bd4a into main May 25, 2026
3 checks passed
@Svtter Svtter deleted the fix/remove-unused-configpath-param branch May 25, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant