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

project create: platform names from registry are unreliable, need client-side validation

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
cli

调研方向

project create 命令开始,跟踪其平台字符串如何传递给 API。比较 src/sentry/models/project.pysrc/sentry/utils/platform_categories.pystatic/app/data/platformCategories.tsx 中的有效标识符;完成的标准是:无效名称应在本地失败,并提供有帮助的错误和相似平台建议,而不是往返调用 API。

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

描述

Problem

@betegon was working on sentry project create and discovered that the platform names from the registry cannot be trusted for our API. The actual source of truth for valid platform identifiers lives in a few places in the sentry backend:

Currently project create sends the platform string straight to the API without validating it. If it's wrong, the API returns a 400 and we show an error after the fact. This is a problem for a couple of reasons:

  1. No client-side validation — we waste a round-trip to the API for invalid platforms, and the error we get back isn't very helpful.

  2. No "did you mean?" suggestions — users can easily get the platform name slightly wrong (e.g. javascript-next instead of javascript-nextjs) and get a generic error with no guidance on the correct name.

  3. Particularly important for agents — when agents are creating projects (like in sentry init), client-side validation would let us fail faster and with better error messages instead of relying on the API round-trip. This matters because agents may generate platform names that are close but not exact.

We should copy the valid platform list locally for the command and also suggest similar platforms when the user provides one that doesn't exist.

主要语言
TypeScript
星标
121
派生
14
平均合并
23 小时 54 分钟
30 天内合并 PR
103

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

getsentry/cli 的其他 Issue

查看 getsentry/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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