Conversation
variables / defaults で vercel_project(string / []string)を指定すると、 認証 config の vercel.projects[] のうち name 一致するターゲットにのみ その変数を同期する。未指定なら従来どおり全ターゲットへ(後方互換)。 - config: VarConf / Defaults に VercelProject フィールド追加(ProviderVal 流用) - provider.Entry に VercelProjects []string を追加 - sync.ResolveEntries で「変数個別 > defaults」解決 - vercel.Sync をターゲット別 items 構成に再構成し filterEntriesByVercelProject / validateEntryVercelProjects を追加(CLI --vercel-project とは AND) - 存在しない name・単一解決モードでの指定はエラー - env-sync.yaml コメント / README にドキュメント追記 - ユニットテスト追加(YAML 解析 / 解決優先順位 / 絞り込み / エラーケース) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MUNfaHdh77j6ZEA2v8oieH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
タスク
env-sync.yaml の variables の各エントリ(および defaults)で、送信先 Vercel プロジェクトを name で指定できるようにする(
vercel_project: app-a/vercel_project: [app-a, app-b])。同期先 ID は認証 config のvercel.projects[].nameを参照するため、git コミット対象のenv-sync.yamlに機密 ID を書かずに済む。Closes #33
変更内容
internal/config/config.go:VarConf/Definition.DefaultsにVercelProject *ProviderVal(yaml:vercel_project)を追加(既存ProviderValの string/[]string 両対応を流用)internal/provider/provider.go:EntryにVercelProjects []stringを追加internal/sync/entry.go:ResolveEntriesで「変数個別 > defaults」の優先順位で解決internal/provider/vercel/vercel.go:Syncをターゲット別 items 構成に再構成。filterEntriesByVercelProject(未指定=全ターゲット, name 一致のみ)とvalidateEntryVercelProjects(単一解決モードでの指定エラー・存在しない name エラー)を追加env-sync.yamlコメント /README.mdにドキュメント追記完了条件
vercel_project: app-a/[app-a, app-b]両記法の YAML 解析--vercel-projectとの AND 絞り込み動作確認
受け入れテスト結果(
--dry-run)app-a / app-b を定義した config と以下の env-sync.yaml で検証:
--vercel-project app-bapp-x品質チェック結果
パフォーマンス診断
filterEntriesByVercelProject/validateEntryVercelProjectsは変数数×プロジェクト名数の小さな二重ループでホットパスでなく問題なし。perTargetItems事前計算も API 呼び出し回数は既存と同一(N+1 なし)。🤖 Generated with Claude Code
https://claude.ai/code/session_01MUNfaHdh77j6ZEA2v8oieH