MCPcopy Index your code
hub / github.com/coder/coder / checkGHAuth

Function checkGHAuth

scripts/releaser/github.go:28–33  ·  view source on GitHub ↗

checkGHAuth verifies that the gh CLI is installed and authenticated. Returns true if gh is available.

()

Source from the content-addressed store, hash-verified

26// checkGHAuth verifies that the gh CLI is installed and
27// authenticated. Returns true if gh is available.
28func checkGHAuth() bool {
29 cmd := exec.Command("gh", "auth", "status")
30 cmd.Stdout = nil
31 cmd.Stderr = nil
32 return cmd.Run() == nil
33}
34
35// ghPR is a minimal pull request representation parsed from gh CLI
36// JSON output.

Callers 1

mainFunction · 0.85

Calls 2

CommandMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected