(cfg sync.SourceConfig)
| 310 | } |
| 311 | |
| 312 | func wizardGitHubConfig(cfg sync.SourceConfig) (sync.SourceConfig, error) { |
| 313 | // Auto-detect repo from git remote |
| 314 | placeholder := "owner/repo" |
| 315 | if detected := github.DetectRepo(); detected != "" { |
| 316 | placeholder = detected |
| 317 | } |
| 318 | |
| 319 | if err := promptInput("Repository", "GitHub repository (e.g. owner/repo)", placeholder, &cfg.Project); err != nil { |
| 320 | return cfg, err |
| 321 | } |
| 322 | |
| 323 | if err := promptInput("Auth token env var", "Name of the environment variable holding your GitHub token", "GITHUB_TOKEN", &cfg.TokenEnv); err != nil { |
| 324 | return cfg, err |
| 325 | } |
| 326 | |
| 327 | filters, err := wizardGitHubFilters() |
| 328 | if err != nil { |
| 329 | return cfg, err |
| 330 | } |
| 331 | cfg.Filters = filters |
| 332 | |
| 333 | return cfg, nil |
| 334 | } |
| 335 | |
| 336 | func wizardGitHubFilters() (map[string]any, error) { |
| 337 | var filterChoice string |
no test coverage detected