fleet/tools/github-manage/cmd/gm/issue.go
George Karr ec2163768f
gkarr gm updates (#32625)
- **Adding sprint command to view items in current sprint and warning
when limit is too small**
- **Adding select / deselect all and demo output**
- **Added hotkey 's' to select all subissues along with the issue
selected**

Example of how I generated the demo docs for mdm this sprint
```
./gm sprint mdm --limit 200
'pressed l to select all issues'
'pressed w to select a workflow'
selected Bulk Demo workflow and hit enter
copy/paste features to features and bugs to bugs
modify gh usernames to @email and hit 'space' after every ) in the markdown to get it to trigger
hit tab for all issues listed under each user
...
profit
```
2025-09-05 16:28:36 -05:00

32 lines
723 B
Go

package main
import (
"fmt"
tea "github.com/charmbracelet/bubbletea"
"github.com/spf13/cobra"
)
var issuesCmd = &cobra.Command{
Use: "issues",
Short: "Get GitHub issues",
Run: func(cmd *cobra.Command, args []string) {
search, err := cmd.Flags().GetString("search")
if err != nil {
fmt.Printf("Error getting search flag: %v\n", err)
return
}
model := initializeModelForIssues(search)
p := tea.NewProgram(&model)
if _, err := p.Run(); err != nil {
fmt.Printf("Error running Bubble Tea program: %v\n", err)
}
if model.exitMessage != "" {
fmt.Println(model.exitMessage)
}
},
}
func init() {
issuesCmd.Flags().StringP("search", "s", "", "Search for issues by github search syntax")
}