Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var List = &cobra.Command{ Use: "list", Run: func(cmd *cobra.Command, args []string) { account := input.Account() repositories := github.Repositories(account) for _, repo := range repositories { clog.Infof(" {{ %s/%s | blue }}", repo.Owner, repo.Name) } }, }
View Source
var Root = &cobra.Command{ Use: "repo", Run: func(cmd *cobra.Command, args []string) { account := input.Account() repositories := github.Repositories(account) var repoMap = make(map[string]github.SimpleRepo) var repoNames []string for _, repo := range repositories { fullRepositoryName := repo.Owner + "/" + repo.Name repoMap[fullRepositoryName] = repo repoNames = append(repoNames, fullRepositoryName) } _, selectedRepository := prompt.Select("Select a repository", repoNames) items := GetActions(selectedRepository) _, selectedAction := prompt.Select("Select an action", items) switch selectedAction { case openCode: shell.RunCmd(".", false, "code", ".") case openGitHub: shell.RunCmd(".", false, "open", repoMap[selectedRepository].Url) } }, }
Functions ¶
func GetActions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.