fix: use manager config schema for manager mode fetch commands#11
Merged
Conversation
Manager mode fetch commands (fetch all, fetch github, fetch jira) were calling loadConfig() which validates against the IC ConfigSchema. The manager config uses ManagerConfigSchema with a different structure (github.org instead of github.username, no fetch field), causing "github.username: Required" and "fetch: Required" validation errors. Changes: - Add fetch (since/until) field to ManagerConfigSchema - Add time range prompt to manager mode init wizard - Add buildReportConfig() helper to convert manager config + report into an IC-compatible Config for the fetch utilities - Replace loadConfig() with loadManagerConfigForFetch() + buildReportConfig() in all three manager mode fetch paths https://claude.ai/code/session_01B1GMk792THEbGeAJEZbb8Q
88cdcef to
73b8670
Compare
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.
Summary
fetch all,fetch github,fetch jira) were broken — they loaded the manager config against the IC schema (ConfigSchema), causing immediate validation errors likegithub.username: Requiredandfetch: Requiredfetch(since/until) field toManagerConfigSchemaand updated the init wizard to prompt for itbuildReportConfig()helper that bridges manager config + per-report config into IC-compatibleConfigobjects, replacing fragile spread-based overrides in all three fetch commandsChanges
src/core/types/manager.ts— newManagerFetchConfigSchema, addedfetchtoManagerConfigSchemasrc/cli/commands/fetch/fetch-manager.utils.ts— newloadManagerConfigForFetch()andbuildReportConfig()functionssrc/cli/commands/fetch/all.ts— use new helpers instead ofloadConfig()+ manual overridessrc/cli/commands/fetch/github/index.ts— same fixsrc/cli/commands/fetch/jira/index.ts— same fixsrc/cli/commands/init/index.ts— manager init now prompts for time rangeTest plan
init --mode managerand verify it prompts for time rangeconfig.yamlincludes thefetchfieldfetch all --all-reportsin manager mode — no more validation errorsfetch github --all-reportsin manager modefetch jira --all-reportsin manager mode (with JIRA configured)https://claude.ai/code/session_01B1GMk792THEbGeAJEZbb8Q