Overview
This tracking issue covers the migration from shell-out gh.Exec() calls to native REST and GraphQL API clients provided by github.com/cli/go-gh/v2. This will improve performance (5-10x faster), simplify code, and follow upstream best practices.
Source: Discussion #5826 (Go Fan report on go-gh module usage)
Current State
The project uses gh.Exec() shell-outs for all GitHub API interactions across 4 files:
pkg/workflow/repository_features_validation.go - Repository feature detection
pkg/workflow/github_cli.go - Wrapper functions
pkg/cli/exec.go - Conditional gh CLI usage
pkg/parser/remote_fetch.go - Remote file downloads
Expected Benefits
- Performance: 5-10x faster (eliminates process spawning overhead)
- Code Quality: Type-safe API calls with automatic JSON handling
- Maintainability: Cleaner error handling and better testability
- Reliability: Built-in retry logic and caching support
Planned Tasks
This work is broken into focused, incremental tasks that can be completed independently:
- #aw_a1b2c3d4e5f6 - Replace
gh repo view with repository.Current()
- #aw_b2c3d4e5f6a7 - Migrate repository features to REST client
- #aw_c3d4e5f6a7b8 - Migrate GraphQL discussions check to native client
- #aw_d4e5f6a7b8c9 - Migrate remote file downloads to REST client
- #aw_e5f6a7b8c9d4 - Enable API caching and adopt pkg/auth
Success Criteria
AI generated by Plan Command for discussion #5826
Overview
This tracking issue covers the migration from shell-out
gh.Exec()calls to native REST and GraphQL API clients provided bygithub.com/cli/go-gh/v2. This will improve performance (5-10x faster), simplify code, and follow upstream best practices.Source: Discussion #5826 (Go Fan report on go-gh module usage)
Current State
The project uses
gh.Exec()shell-outs for all GitHub API interactions across 4 files:pkg/workflow/repository_features_validation.go- Repository feature detectionpkg/workflow/github_cli.go- Wrapper functionspkg/cli/exec.go- Conditional gh CLI usagepkg/parser/remote_fetch.go- Remote file downloadsExpected Benefits
Planned Tasks
This work is broken into focused, incremental tasks that can be completed independently:
gh repo viewwithrepository.Current()Success Criteria
gh.Exec()calls replaced with native API clients