MCPcopy Create free account
hub / github.com/driangle/taskmd / wizardGitHubConfig

Function wizardGitHubConfig

apps/cli/internal/cli/importcmd.go:312–334  ·  view source on GitHub ↗
(cfg sync.SourceConfig)

Source from the content-addressed store, hash-verified

310}
311
312func 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
336func wizardGitHubFilters() (map[string]any, error) {
337 var filterChoice string

Callers 1

wizardSourceConfigFunction · 0.85

Calls 2

promptInputFunction · 0.85
wizardGitHubFiltersFunction · 0.85

Tested by

no test coverage detected