{"record":{"id":"e8308e4c66283bfd","repo":"windmill-labs/windmill","slug":"repository-selectedrepo-git-repo-resource-path","errorCode":null,"errorMessage":"Repository \"${selectedRepo.git_repo_resource_path}\" has legacy format but workspace-level include_path or include_type is missing. This indicates corrupted git-sync settings.","messagePattern":"Repository \"(.+?)\" has legacy format but workspace-level include_path or include_type is missing\\. This indicates corrupted git-sync settings\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/gitsync-settings/legacySettings.ts","lineNumber":22,"sourceCode":"import { Confirm } from \"@cliffy/prompt/confirm\";\nimport * as wmill from \"../../../gen/services.gen.ts\";\nimport { GitSyncRepository } from \"./types.ts\";\n\n// Shared migration function for legacy repositories\nexport async function handleLegacyRepositoryMigration(\n  selectedRepo: any,\n  gitSyncSettings: any,\n  workspace: any,\n  opts: { yes?: boolean },\n  operationName: string = \"operation\"\n): Promise<any> {\n  if (selectedRepo.settings) {\n    return selectedRepo; // Already migrated\n  }\n\n  // This repository is in legacy format - handle migration\n  if (!gitSyncSettings.include_path || !gitSyncSettings.include_type) {\n    throw new Error(\n      `Repository \"${selectedRepo.git_repo_resource_path}\" has legacy format but workspace-level include_path or include_type is missing. This indicates corrupted git-sync settings.`\n    );\n  }\n\n  const workspaceIncludePath = gitSyncSettings.include_path;\n  const workspaceIncludeType = gitSyncSettings.include_type;\n\n  if (!!process.stdout.isTTY && !opts.yes) {\n    // Interactive mode - show migration prompt\n    console.log(colors.yellow('\\n⚠️  Legacy git-sync settings detected!'));\n    console.log(`\\nRepository \"${selectedRepo.git_repo_resource_path}\" has legacy settings format.`);\n    console.log('The new format allows per-repository filter configuration.');\n    if (operationName === \"push\") {\n      console.log('This repository must be migrated before pushing settings.\\n');\n    } else {\n      console.log('\\n');\n    }\n","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/gitsync-settings/legacySettings.ts#L4-L40","documentation":"Error \"Repository \"${selectedRepo.git_repo_resource_path}\" has legacy format but workspace-level include_path or include_type is missing. This indicates corrupted git-sync settings.\" thrown in windmill-labs/windmill.","triggerScenarios":"Thrown at cli/src/commands/gitsync-settings/legacySettings.ts:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Repair the git-sync settings in the UI (Settings → Git Sync) so workspace-level include_path/include_type arrays exist, then retry the pull/push","If quick repair isn't possible, reset the workspace git-sync configuration to defaults and re-enter the repository settings","As a last resort, an admin can correct the raw settings via the API/DB so both workspace-level fields are present arrays"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}