ExecGHContext wraps gh CLI calls with context support and ensures proper token configuration. Similar to ExecGH but accepts a context for cancellation and timeout support. Usage: cmd := ExecGHContext(ctx, "api", "/user") output, err := cmd.Output()
(ctx context.Context, args ...string)
| 89 | // cmd := ExecGHContext(ctx, "api", "/user") |
| 90 | // output, err := cmd.Output() |
| 91 | func ExecGHContext(ctx context.Context, args ...string) *exec.Cmd { |
| 92 | return setupGHCommand(ctx, args...) |
| 93 | } |
| 94 | |
| 95 | // enrichGHError enriches an error returned from a gh CLI command with the |
| 96 | // stderr output captured in *exec.ExitError. When cmd.Output() (stdout-only |