MCPcopy Create free account
hub / github.com/github/gh-aw / RunGHCombinedContext

Function RunGHCombinedContext

pkg/workflow/github_cli.go:183–185  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

181//
182// output, err := RunGHCombinedContext(ctx, "Fetching releases...", "api", "/repos/owner/repo/releases")
183func 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

Callers 8

runOrgAPICombinedFunction · 0.92
downloadWorkflowContentFunction · 0.92
fetchWorkflowRunMetadataFunction · 0.92
defaultActionUpdateDepsFunction · 0.92
TestRunGHFunctionsFunction · 0.85
RunGHCombinedFunction · 0.85

Calls 1

runGHWithSpinnerContextFunction · 0.85

Tested by 1

TestRunGHFunctionsFunction · 0.68