Add interactive prompt for configuration file setup (filters & publishing overrides)

未关闭
#120 2 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

@azaslonov 已经在做这个了。

开始于 2026年7月7日。

评估

这个 Issue 还没有评估数据。

描述

go:needs-research P2 squad squad:apimexpert

Problem

After running apiops init to scaffold the repo and the identity prompt to connect GitHub & Azure, there is no guided experience for setting up configuration files (extraction filters and publishing overrides). Users must manually create and edit these files, which is error-prone and requires deep knowledge of the configuration schema.

Context — Current Onboarding Flow

  1. apiops init — scaffolds the repo structure and CI/CD pipelines
  2. Identity prompt — connects GitHub & Azure (OIDC, service principals, etc.)
  3. First extraction — pulls down the current APIM state into the repo
  4. Missing step — no guided setup for configuration files

Proposed Solution

Add a new interactive prompt (e.g., apiops configure or a post-extraction prompt) that helps users produce well-structured configuration files after their first extraction. The prompt should:

1. Review Extracted Files
  • Scan the extracted APIM artifacts to understand what resources exist (APIs, named values, backends, products, etc.)
  • Identify resources that commonly need per-environment overrides (e.g., named values with secrets, backend URLs, etc.)
2. Generate Filter Configuration
  • Walk the user through which APIs/resources to include or exclude from publishing
  • Produce the appropriate filter/extraction configuration file
3. Generate Publishing Override Configuration
  • Identify values that likely differ across environments (dev → staging → prod)
  • For placeholder/token values needed in production, interactively ask the user for the correct values or secret references
  • Generate environment-specific configuration files (e.g., configuration.prod.yaml) with appropriate overrides
  • Use {#[TOKEN_NAME]#} placeholder syntax for secrets (per #117)
4. Interactive & Best-Effort
  • The prompt should be conversational — guide the user through decisions rather than requiring upfront knowledge
  • Make sensible defaults and best-effort suggestions based on the extracted artifacts
  • Allow the user to review and confirm before writing files

Acceptance Criteria

  • New interactive prompt is available to run after the first extraction
  • Prompt scans extracted artifacts and identifies resources needing overrides
  • Prompt interactively asks users about environment-specific values (especially secrets/production placeholders)
  • Generates filter configuration for extraction
  • Generates per-environment publishing override configuration files
  • Uses {#[TOKEN_NAME]#} placeholder syntax for secret values
  • Provides sensible defaults and best-effort suggestions
  • Documentation explains when and how to run this prompt in the onboarding flow
主要语言
TypeScript
星标
29
派生
10
平均合并
1 天 14 小时
30 天内合并 PR
22

贡献指南

打开贡献指南

从这里开始

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

Azure/apiops-cli 的其他 Issue

查看 Azure/apiops-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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