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

Function RunGHContext

pkg/workflow/github_cli.go:161–163  ·  view source on GitHub ↗

RunGHContext executes a gh CLI command with context support (for cancellation/timeout), a spinner, and returns the stdout output. The spinner is shown in interactive terminals to provide feedback during network operations. Usage: output, err := RunGHContext(ctx, "Fetching user info...", "api", "/

(ctx context.Context, spinnerMessage string, args ...string)

Source from the content-addressed store, hash-verified

159//
160// output, err := RunGHContext(ctx, "Fetching user info...", "api", "/user")
161func RunGHContext(ctx context.Context, spinnerMessage string, args ...string) ([]byte, error) {
162 return runGHWithSpinnerContext(ctx, spinnerMessage, false, args...)
163}
164
165// RunGHCombined executes a gh CLI command with a spinner and returns combined stdout+stderr output.
166// The spinner is shown in interactive terminals to provide feedback during network operations.

Callers 13

searchOrgReposByQueryFunction · 0.92
downloadWorkflowRunLogsFunction · 0.92
getCurrentGitHubUsernameFunction · 0.92
runOrgAPIFunction · 0.92
getRepoDefaultBranchFunction · 0.92
getLatestBranchCommitSHAFunction · 0.92
waitForOrgRateLimitFunction · 0.92
getActionSHAForTagFunction · 0.92
TestRunGHFunctionsFunction · 0.70

Calls 1

runGHWithSpinnerContextFunction · 0.85

Tested by 1

TestRunGHFunctionsFunction · 0.56