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

Function RunGH

pkg/workflow/github_cli.go:150–152  ·  view source on GitHub ↗

RunGH executes a gh CLI command with a spinner and returns the stdout output. The spinner is shown in interactive terminals to provide feedback during network operations. The spinnerMessage parameter describes what operation is being performed. Usage: output, err := RunGH("Fetching user info...",

(spinnerMessage string, args ...string)

Source from the content-addressed store, hash-verified

148//
149// output, err := RunGH("Fetching user info...", "api", "/user")
150func RunGH(spinnerMessage string, args ...string) ([]byte, error) {
151 return RunGHContext(context.Background(), spinnerMessage, args...)
152}
153
154// RunGHContext executes a gh CLI command with context support (for cancellation/timeout), a
155// spinner, and returns the stdout output. The spinner is shown in interactive terminals to

Callers 15

checkExistingSecretsMethod · 0.92
checkSecretExistsFunction · 0.92
getCurrentUserFunction · 0.92
validateOwnerFunction · 0.92
getOwnerNodeIdFunction · 0.92
createProjectFunction · 0.92
linkProjectToRepoFunction · 0.92

Calls 2

BackgroundMethod · 0.80
RunGHContextFunction · 0.70

Tested by 1

TestRunGHFunctionsFunction · 0.56