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