RunGHCombinedContext executes a gh CLI command with context support (for cancellation/timeout), a spinner, and returns combined stdout+stderr output. The spinner is shown in interactive terminals to provide feedback during network operations. Usage: output, err := RunGHCombinedContext(ctx, "Fetch
(ctx context.Context, spinnerMessage string, args ...string)
| 181 | // |
| 182 | // output, err := RunGHCombinedContext(ctx, "Fetching releases...", "api", "/repos/owner/repo/releases") |
| 183 | func RunGHCombinedContext(ctx context.Context, spinnerMessage string, args ...string) ([]byte, error) { |
| 184 | return runGHWithSpinnerContext(ctx, spinnerMessage, true, args...) |
| 185 | } |
| 186 | |
| 187 | // RunGHWithHost executes a gh CLI command with a spinner, targeting a specific GitHub host. |
| 188 | // For non-github.com hosts (GHES, Proxima/data residency), the GH_HOST environment variable |