(p iprompter, r *api.Repository)
| 358 | } |
| 359 | |
| 360 | func interactiveChoice(p iprompter, r *api.Repository) ([]string, error) { |
| 361 | options := []string{ |
| 362 | optionDefaultBranchName, |
| 363 | optionDescription, |
| 364 | optionHomePageURL, |
| 365 | optionIssues, |
| 366 | optionMergeOptions, |
| 367 | optionProjects, |
| 368 | // TODO: GitHub Enterprise Server does not support has_discussions yet |
| 369 | // optionDiscussions, |
| 370 | optionTemplateRepo, |
| 371 | optionTopics, |
| 372 | optionVisibility, |
| 373 | optionWikis, |
| 374 | } |
| 375 | if r.IsInOrganization { |
| 376 | options = append(options, optionAllowForking) |
| 377 | } |
| 378 | var answers []string |
| 379 | selected, err := p.MultiSelect("What do you want to edit?", nil, options) |
| 380 | if err != nil { |
| 381 | return nil, err |
| 382 | } |
| 383 | for _, i := range selected { |
| 384 | answers = append(answers, options[i]) |
| 385 | } |
| 386 | |
| 387 | return answers, err |
| 388 | } |
| 389 | |
| 390 | func interactiveRepoEdit(opts *EditOptions, r *api.Repository) error { |
| 391 | for _, v := range r.RepositoryTopics.Nodes { |
no test coverage detected