gitops_task_helpers.ts view source
(options: GetGitopsReadyOptions): Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }> Central initialization function for all gitops tasks.
Initialization sequence:
1. Loads and normalizes config from gitops.config.ts
2. Resolves local repo paths (creates missing with --download)
3. Switches branches and pulls latest changes
4. Auto-installs deps if package.json changed during pull
Priority for path resolution:
- dir argument (explicit override)
- Config repos_dir setting
- DEFAULT_REPOS_DIR constant
options
returns
Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }> initialized config and fully loaded repos ready for operations
throws
if- config loading or repo resolution fails