Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

schemas create --dry-run doesn't validate anything, just echoes input back

未关闭
#8 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cli, shell
领域
cli, testing

调研方向

Look at the schemas create command implementation, likely in a commands/ or schemas/ directory. Compare it with schemas update --dry-run to see how the API validation is called. The fix involves ensuring the dry-run path performs the same validation as the real execution. Run the failing test cases from the issue description to verify the fix.

由索引模型根据 Issue 内容生成。

描述

Version: hubspot 0.14.0 (build 1162, commit unknown)

Command run:

$ echo '{}' | hubspot schemas create --dry-run
$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run

Expected result: given schemas create (without --dry-run) rejects both of these bodies with a 400 validation error (Some required fields were not set: [name, labels], then [labels]), the --dry-run equivalent should surface the same validation problem rather than reporting success.

Actual result: --dry-run reports ok: true for both, regardless of body content, simply echoing back whatever was piped in:

$ echo '{}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{}}

$ echo '{"name":"test_object_xyz"}' | hubspot schemas create --dry-run
{"ok":true,"executed":false,"dry_run":true,"data":{"name":"test_object_xyz"}}

$ echo '{}' | hubspot schemas create
{"ok":false,"error":{"status":400,"message":"Invalid input JSON on line 1, column 2. Some required fields were not set: [name, labels]"}}

For comparison, schemas update --dry-run genuinely calls the API - it returns portal-specific data (state_snapshot, digest, the actual portal ID), so this isn't true of every --dry-run in the CLI, just schemas create (and possibly other create commands - not exhaustively tested).

Why this matters: the README's own beta warning recommends using --dry-run before mutations as the safety practice for a tool that can modify live CRM data. For schemas create, a passing dry-run gives no assurance the real call will succeed.

主要语言
没有语言数据
星标
7
派生
2
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

HubSpot/agent-cli 的其他 Issue

查看 HubSpot/agent-cli 的全部 Issue

相似的 Issue

更多 CLI Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。