Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
7,487 in github.com/cli/cli
⨍
Functions
7,487
◇
Types & classes
1,526
↓ 1,408 callers
Method
Equal
(s2 *stringSet)
pkg/set/string_set.go:72
↓ 993 callers
Method
Run
()
internal/run/run.go:19
↓ 927 callers
Method
String
()
internal/safeurl/safeurl.go:33
↓ 676 callers
Function
Test
()
pkg/iostreams/iostreams.go:586
↓ 637 callers
Method
Errorf
(string, ...any)
pkg/httpmock/registry.go:56
↓ 575 callers
Method
Register
(m Matcher, resp Responder)
pkg/httpmock/registry.go:24
↓ 475 callers
Method
Join
Join an absolute path with elements to create a new Absolute path, or error. A PathTraversalError will be returned if the joined path would traverse o
internal/safepaths/absolute.go:38
↓ 449 callers
Method
Verify
(t Testing)
pkg/httpmock/registry.go:60
↓ 342 callers
Method
Contains
(value string)
pkg/set/string_set.go:59
↓ 342 callers
Method
SetStdoutTTY
(isTTY bool)
pkg/iostreams/iostreams.go:177
↓ 307 callers
Function
GraphQL
(q string)
pkg/httpmock/stub.go:44
↓ 280 callers
Method
RepoHost
()
internal/ghrepo/repo.go:17
↓ 271 callers
Method
Errorf
(string, ...any)
internal/run/stub.go:17
↓ 266 callers
Function
StringResponse
(body string)
pkg/httpmock/stub.go:124
↓ 261 callers
Method
Close
()
internal/codespaces/rpc/invoker.go:44
↓ 252 callers
Function
New
New instantiates a GitHub repository from owner and name arguments
internal/ghrepo/repo.go:21
↓ 251 callers
Function
REST
REST returns a matcher to a request for the HTTP method and URL escaped path p. For example, to match a GET request to `/api/v3/repos/octocat/hello-wo
pkg/httpmock/stub.go:35
↓ 239 callers
Function
NewClientFromHTTP
(httpClient *http.Client)
api/client.go:30
↓ 232 callers
Method
SetStdinTTY
(isTTY bool)
pkg/iostreams/iostreams.go:162
↓ 208 callers
Method
RepoOwner
()
internal/ghrepo/repo.go:16
↓ 202 callers
Method
ColorScheme
()
pkg/iostreams/iostreams.go:434
↓ 196 callers
Method
RepoName
()
internal/ghrepo/repo.go:15
↓ 166 callers
Method
SetStderrTTY
(isTTY bool)
pkg/iostreams/iostreams.go:194
↓ 163 callers
Function
StatusStringResponse
(status int, body string)
pkg/httpmock/stub.go:156
↓ 159 callers
Function
JoinPath
JoinPath returns a SafeURL for the path made up of the given components. It returns an error if any component is exactly "..", which would traverse th
internal/safeurl/safeurl.go:54
↓ 155 callers
Method
IsStdoutTTY
()
pkg/iostreams/iostreams.go:182
↓ 143 callers
Function
FlagErrorf
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
pkg/cmdutil/errors.go:12
↓ 135 callers
Function
NewMockConfig
NewMockConfig returns a mock config populated with gh's default config file. See NewMockConfigFromString for when to prefer a mock over NewIsolatedTes
internal/config/test.go:19
↓ 133 callers
Function
FullName
FullName serializes a GitHub repository into an "OWNER/REPO" string
internal/ghrepo/repo.go:35
↓ 130 callers
Method
Len
()
pkg/cmd/status/status.go:168
↓ 126 callers
Function
Stub
Stub installs a catch-all for all external commands invoked from gh. It returns a restore func that, when invoked from tests, fails the current test i
internal/run/stub.go:22
↓ 124 callers
Method
BaseRepo
While the only thing really required from an api.Repository is the repository ID, changing that would require changing the API function signatures, an
pkg/cmd/pr/create/create.go:106
↓ 124 callers
Function
NewTestClient
(opts ...TestClientOpt)
pkg/cmd/project/shared/queries/queries.go:41
↓ 122 callers
Method
Error
()
pkg/cmd/root/root.go:61
↓ 121 callers
Method
Reply
Reply method for sshRequest to satisfy the tunnelssh.SSHRequest interface
internal/codespaces/connection/tunnels_api_server_mock.go:371
↓ 117 callers
Method
REST
(hostname, method, p string, body io.Reader, data any)
pkg/cmd/attestation/api/client.go:57
↓ 115 callers
Function
FromFullName
FromFullName extracts the GitHub repository information from the following formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL.
internal/ghrepo/repo.go:46
↓ 114 callers
Method
Write
(io *iostreams.IOStreams, data any)
pkg/cmdutil/json_flags.go:200
↓ 112 callers
Method
WriteFile
WriteFile writes a complete file beneath the root. Creation permissions follow [Root.Create].
internal/safepaths/root.go:236
↓ 102 callers
Method
Stderr
()
test/helpers.go:19
↓ 100 callers
Method
Authentication
Authentication provides persistent storage and modification of authentication configuration.
internal/gh/gh.go:75
↓ 99 callers
Method
Set
Set provides primitive access for setting configuration values, optionally scoped by host.
internal/gh/gh.go:40
↓ 97 callers
Method
CanPrompt
()
pkg/iostreams/iostreams.go:276
↓ 91 callers
Function
GraphQLMutation
(body string, cb func(map[string]any))
pkg/httpmock/stub.go:217
↓ 88 callers
Method
Empty
Empty reports whether the content is empty, for callers that branch on presence without needing the bytes.
pkg/iostreams/untrusted.go:55
↓ 88 callers
Method
Query
(queryName string, query any, variables map[string]any)
pkg/cmd/project/shared/queries/queries.go:77
↓ 85 callers
Method
Config
(name string)
pkg/cmd/extension/git.go:13
↓ 85 callers
Method
MkdirAll
MkdirAll creates a directory path without traversing symbolic links.
internal/safepaths/root.go:142
↓ 84 callers
Function
newTestAuthConfig
Note that NewIsolatedTestConfig sets up a Mock keyring as well
internal/config/auth_config_test.go:16
↓ 82 callers
Function
StubFinderForRunCommandStyleTests
StubFinderForRunCommandStyleTests is the NewMockFinder substitute to be used ONLY in runCommand-style tests.
pkg/cmd/pr/shared/finder.go:78
↓ 80 callers
Method
Get
Get retrieves the expansion for a specified alias.
internal/gh/gh.go:336
↓ 78 callers
Method
Bold
(t string)
pkg/iostreams/color.go:60
↓ 78 callers
Function
JSONResponse
(body any)
pkg/httpmock/stub.go:162
↓ 75 callers
Method
Helper
()
internal/run/stub.go:16
↓ 75 callers
Method
Verify
(attestations []*api.Attestation, policy verify.PolicyBuilder)
pkg/cmd/attestation/verification/sigstore.go:45
↓ 74 callers
Method
StopProgressIndicator
()
internal/codespaces/codespaces.go:47
↓ 73 callers
Method
Command
(ctx context.Context, args ...string)
git/client.go:75
↓ 71 callers
Method
DefaultHost
()
pkg/cmd/status/status.go:31
↓ 71 callers
Method
Error
()
pkg/cmd/auth/shared/oauth_scopes.go:17
↓ 67 callers
Function
newTestRepo
(t *testing.T)
git/client_test.go:1555
↓ 64 callers
Method
ID
()
api/queries_repo.go:1166
↓ 63 callers
Method
Base
()
pkg/cmd/workflow/shared/shared.go:50
↓ 63 callers
Function
NewWithHost
NewWithHost is like New with an explicit host name
internal/ghrepo/repo.go:26
↓ 61 callers
Method
Helper
()
pkg/httpmock/registry.go:57
↓ 61 callers
Method
Output
()
internal/run/run.go:18
↓ 61 callers
Method
SuccessIcon
()
pkg/iostreams/color.go:192
↓ 58 callers
Method
Mutate
(queryName string, query any, variables map[string]any)
pkg/cmd/project/shared/queries/queries.go:78
↓ 58 callers
Method
Name
()
pkg/cmd/pr/shared/templates.go:118
↓ 57 callers
Method
Select
(prompt string, defaultValue string, options []string)
pkg/cmd/pr/shared/survey.go:40
↓ 56 callers
Method
Error
()
pkg/cmd/project/shared/queries/resolve.go:35
↓ 55 callers
Method
Render
(logs []byte, w io.Writer, io *iostreams.IOStreams)
pkg/cmd/agent-task/shared/log.go:20
↓ 54 callers
Method
Value
Value returns the underlying value and true for a [Some] variant, or the zero value and false for a [None] variant.
pkg/option/option.go:122
↓ 49 callers
Method
StartPager
()
pkg/iostreams/iostreams.go:217
↓ 49 callers
Method
StartProgressIndicator
()
pkg/cmd/pr/shared/finder.go:34
↓ 49 callers
Method
StopPager
()
pkg/iostreams/iostreams.go:265
↓ 48 callers
Method
Changed
Changed reports whether the attachment flag was passed.
internal/attachments/flags.go:38
↓ 48 callers
Function
IndexFor
(options []string, answer string)
internal/prompter/test.go:150
↓ 48 callers
Method
WarningIcon
()
pkg/iostreams/color.go:200
↓ 47 callers
Function
MutuallyExclusive
(message string, conditions ...bool)
pkg/cmdutil/errors.go:47
↓ 46 callers
Function
AddJSONFlags
(cmd *cobra.Command, exportTarget *Exporter, fields []string)
pkg/cmdutil/json_flags.go:26
↓ 46 callers
Method
Login
Login will set user, git protocol, and auth token for the given hostname. If the encrypt option is specified it will first try to store the auth toke
internal/gh/gh.go:283
↓ 46 callers
Function
NewJSONExporter
NewJSONExporter returns an Exporter to emit JSON.
pkg/cmdutil/json_flags.go:210
↓ 45 callers
Function
NewImmutableSafeURL
NewImmutableSafeURL returns an ImmutableSafeURL that renders url verbatim. Only pass a URL you built yourself from trusted components or received from
internal/safeurl/safeurl.go:120
↓ 45 callers
Method
run
(t *testing.T, args ...string)
git/client_test.go:1593
↓ 44 callers
Function
GraphQLQuery
(body string, cb func(string, map[string]any))
pkg/httpmock/stub.go:234
↓ 43 callers
Method
Add
(string)
pkg/cmd/status/status.go:169
↓ 43 callers
Function
New
New creates a TablePrinter from an IOStreams.
internal/tableprinter/table_printer.go:47
↓ 41 callers
Function
WithHeader
WithHeader defines the column names for a table. Panics if columns is nil or empty.
internal/tableprinter/table_printer.go:92
↓ 41 callers
Function
initFakeHTTP
()
pkg/cmd/pr/merge/merge_test.go:311
↓ 41 callers
Function
newTestClient
(reg *httpmock.Registry)
api/client_test.go:17
↓ 39 callers
Method
SetQuery
SetQuery sets the query parameter key to value, replacing any existing value.
internal/safeurl/safeurl.go:87
↓ 38 callers
Method
Browse
(string)
pkg/cmd/gist/view/view.go:23
↓ 38 callers
Function
EnableRepoOverride
(cmd *cobra.Command, f *Factory)
pkg/cmdutil/repo_override.go:36
↓ 38 callers
Method
Error
()
pkg/cmd/repo/autolink/view/view_test.go:110
↓ 37 callers
Method
Events
Events returns copies of all captured events with their latest updates.
internal/telemetry/fake.go:32
↓ 37 callers
Method
Open
(key string)
pkg/cmd/run/view/view.go:67
↓ 37 callers
Method
Remove
(name string)
pkg/extensions/extension.go:37
↓ 37 callers
Function
baseRepo
(owner, repo, branch string)
pkg/cmd/pr/merge/merge_test.go:236
↓ 36 callers
Method
GraphQL
GraphQL performs a GraphQL request using the query string and parses the response into data receiver. If there are errors in the response, GraphQLErro
api/client.go:108
↓ 36 callers
Function
NewNoResultsError
(message string)
pkg/cmdutil/errors.go:68
next →
1–100 of 7,487, ranked by callers