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

project create: dynamic platform auto-complete from release registry

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 src/commands/project/create.ts 开始,阅读链接的 PR 讨论,然后检查所引用 URL 上的 release registry 响应。验证所述的 slug 转换,并确定交互式补全与非交互式输出有何不同。当平台来自 registry、有效标识符会在交互模式下提供建议,并且无效或缺失的输入会生成指定的分组树视图时,即视为完成。

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

描述

Summary

sentry project create currently accepts a <platform> argument but provides no guidance on valid values beyond a static docs link (recently removed). Sourcing the platform list dynamically from the release registry would enable shell auto-complete in interactive sessions and a formatted tree-view in non-interactive ones.

Current behavior

The platform argument for sentry project create is a free-form string. The error message for invalid input lists available platforms but has no shell completion support. The platform list is hardcoded/static and not sourced from a live registry.

// src/commands/project/create.ts
"Run 'sentry project create <name> <platform>' with any valid Sentry platform identifier."

Gap

Users have no discoverability for valid platform identifiers at the CLI level. They must look up values externally, and the CLI cannot validate or suggest values at input time.

Options

Option A — Dynamic auto-complete + interactive tree-view

  • Fetch platform slugs from https://release-registry.services.sentry.io/sdks at runtime.
  • Derive platform identifiers by stripping the sentry. prefix and converting . to - (matching the slugification logic in the Sentry monorepo).
  • In interactive shells: register completions so the user gets tab-completion suggestions.
  • In non-interactive mode (e.g., CI, pipes): print a formatted tree-view grouped by language/category when an invalid or missing platform is supplied.

Option B — Cached static list baked at build time

  • Snapshot the platform list from the registry at release time and embed it in the binary.
  • Simpler implementation but goes stale between releases.

Recommendation

Option A. The release registry is the authoritative source and is already used by other Sentry tooling. Dynamic fetching keeps the list accurate without re-releases, and the interactive/non-interactive split gives the best UX in both contexts.

References

主要语言
TypeScript
星标
123
派生
14
平均合并
1 天 3 小时
30 天内合并 PR
69

环境准备

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

从这里开始

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

getsentry/cli 的其他 Issue

查看 getsentry/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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