Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
5,846 in github.com/cli/cli
⨍
Functions
5,846
◇
Types & classes
1,298
↓ 1,079 callers
Method
Equal
(s2 *stringSet)
pkg/set/string_set.go:72
↓ 828 callers
Method
Run
()
internal/run/run.go:19
↓ 810 callers
Method
String
()
internal/safeurl/safeurl.go:33
↓ 603 callers
Function
Test
()
pkg/iostreams/iostreams.go:585
↓ 582 callers
Method
Errorf
(string, ...interface{})
pkg/httpmock/registry.go:56
↓ 467 callers
Method
Register
(m Matcher, resp Responder)
pkg/httpmock/registry.go:24
↓ 356 callers
Method
Verify
(t Testing)
pkg/httpmock/registry.go:60
↓ 322 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
↓ 316 callers
Method
SetStdoutTTY
(isTTY bool)
pkg/iostreams/iostreams.go:176
↓ 284 callers
Function
GraphQL
(q string)
pkg/httpmock/stub.go:44
↓ 252 callers
Method
RepoHost
()
internal/ghrepo/repo.go:17
↓ 241 callers
Function
StringResponse
(body string)
pkg/httpmock/stub.go:124
↓ 224 callers
Method
Contains
(value string)
pkg/set/string_set.go:59
↓ 212 callers
Method
SetStdinTTY
(isTTY bool)
pkg/iostreams/iostreams.go:161
↓ 204 callers
Method
RepoOwner
()
internal/ghrepo/repo.go:16
↓ 203 callers
Function
New
New instantiates a GitHub repository from owner and name arguments
internal/ghrepo/repo.go:21
↓ 200 callers
Method
Close
()
internal/codespaces/rpc/invoker.go:44
↓ 191 callers
Method
RepoName
()
internal/ghrepo/repo.go:15
↓ 190 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
↓ 188 callers
Method
Errorf
(string, ...interface{})
internal/run/stub.go:17
↓ 179 callers
Function
NewClientFromHTTP
(httpClient *http.Client)
api/client.go:29
↓ 178 callers
Method
ColorScheme
()
pkg/iostreams/iostreams.go:433
↓ 146 callers
Method
SetStderrTTY
(isTTY bool)
pkg/iostreams/iostreams.go:193
↓ 143 callers
Method
IsStdoutTTY
()
pkg/iostreams/iostreams.go:181
↓ 130 callers
Function
FlagErrorf
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
pkg/cmdutil/errors.go:12
↓ 124 callers
Function
NewTestClient
(opts ...TestClientOpt)
pkg/cmd/project/shared/queries/queries.go:41
↓ 121 callers
Method
Reply
Reply method for sshRequest to satisfy the tunnelssh.SSHRequest interface
internal/codespaces/connection/tunnels_api_server_mock.go:373
↓ 118 callers
Function
NewBlankConfig
()
internal/config/stub.go:16
↓ 116 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
↓ 114 callers
Method
Error
()
pkg/cmd/root/root.go:60
↓ 113 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:95
↓ 113 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
↓ 110 callers
Function
FullName
FullName serializes a GitHub repository into an "OWNER/REPO" string
internal/ghrepo/repo.go:35
↓ 105 callers
Method
Write
(io *iostreams.IOStreams, data interface{})
pkg/cmdutil/json_flags.go:200
↓ 104 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
↓ 103 callers
Function
StatusStringResponse
(status int, body string)
pkg/httpmock/stub.go:156
↓ 100 callers
Method
Stderr
()
test/helpers.go:19
↓ 95 callers
Method
CanPrompt
()
pkg/iostreams/iostreams.go:275
↓ 85 callers
Function
GraphQLMutation
(body string, cb func(map[string]interface{}))
pkg/httpmock/stub.go:217
↓ 84 callers
Method
Query
(queryName string, query interface{}, variables map[string]interface{})
pkg/cmd/project/shared/queries/queries.go:77
↓ 82 callers
Method
Authentication
Authentication provides persistent storage and modification of authentication configuration.
internal/gh/gh.go:67
↓ 82 callers
Method
REST
(hostname, method, p string, body io.Reader, data interface{})
pkg/cmd/attestation/api/client.go:57
↓ 80 callers
Function
StubFinderForRunCommandStyleTests
StubFinderForRunCommandStyleTests is the NewMockFinder substitute to be used ONLY in runCommand-style tests.
pkg/cmd/pr/shared/finder.go:78
↓ 79 callers
Method
Config
(name string)
pkg/cmd/extension/git.go:13
↓ 79 callers
Method
Set
Set provides primitive access for setting configuration values, optionally scoped by host.
internal/gh/gh.go:36
↓ 73 callers
Function
JoinPathWithHostPrefix
JoinPathWithHostPrefix returns a SafeURL for the given host prefix and the path made up of the given components. It returns an error if any component
internal/safeurl/safeurl.go:64
↓ 71 callers
Function
JSONResponse
(body interface{})
pkg/httpmock/stub.go:162
↓ 71 callers
Method
Len
()
pkg/cmd/status/status.go:167
↓ 71 callers
Method
StopProgressIndicator
()
internal/codespaces/codespaces.go:47
↓ 70 callers
Method
Bold
(t string)
pkg/iostreams/color.go:60
↓ 69 callers
Function
HandleHTTPError
HandleHTTPError parses a http.Response into a HTTPError. The caller is responsible to close the response body stream.
api/client.go:158
↓ 67 callers
Method
DefaultHost
()
pkg/cmd/status/status.go:30
↓ 66 callers
Method
Verify
(attestations []*api.Attestation, policy verify.PolicyBuilder)
pkg/cmd/attestation/verification/sigstore.go:45
↓ 64 callers
Method
ID
()
api/queries_repo.go:1163
↓ 62 callers
Method
Command
(ctx context.Context, args ...string)
git/client.go:77
↓ 58 callers
Method
Error
()
pkg/cmd/auth/shared/oauth_scopes.go:18
↓ 58 callers
Method
Mutate
(queryName string, query interface{}, variables map[string]interface{})
pkg/cmd/project/shared/queries/queries.go:78
↓ 57 callers
Method
Name
()
pkg/cmd/pr/shared/templates.go:118
↓ 56 callers
Method
Select
(prompt string, defaultValue string, options []string)
pkg/cmd/pr/shared/survey.go:40
↓ 55 callers
Method
Error
()
pkg/cmd/project/shared/queries/resolve.go:35
↓ 55 callers
Method
SuccessIcon
()
pkg/iostreams/color.go:192
↓ 54 callers
Function
newTestAuthConfig
Note that NewIsolatedTestConfig sets up a Mock keyring as well
internal/config/auth_config_test.go:14
↓ 52 callers
Method
Do
(*http.Request)
pkg/cmd/release/shared/upload.go:24
↓ 50 callers
Method
Output
()
internal/run/run.go:18
↓ 49 callers
Function
RESTPrefix
(hostname string)
internal/ghinstance/host.go:59
↓ 47 callers
Method
Render
(logs []byte, w io.Writer, io *iostreams.IOStreams)
pkg/cmd/agent-task/shared/log.go:20
↓ 47 callers
Method
StartPager
()
pkg/iostreams/iostreams.go:216
↓ 47 callers
Method
StopPager
()
pkg/iostreams/iostreams.go:264
↓ 46 callers
Method
StartProgressIndicator
()
pkg/cmd/pr/shared/finder.go:34
↓ 45 callers
Method
Base
()
pkg/cmd/workflow/shared/shared.go:49
↓ 43 callers
Function
IndexFor
(options []string, answer string)
internal/prompter/test.go:150
↓ 41 callers
Function
AddJSONFlags
(cmd *cobra.Command, exportTarget *Exporter, fields []string)
pkg/cmdutil/json_flags.go:26
↓ 41 callers
Method
Get
Get retrieves the expansion for a specified alias.
internal/gh/gh.go:176
↓ 41 callers
Function
GraphQLQuery
(body string, cb func(string, map[string]interface{}))
pkg/httpmock/stub.go:234
↓ 40 callers
Function
New
New creates a TablePrinter from an IOStreams.
internal/tableprinter/table_printer.go:47
↓ 40 callers
Function
NewJSONExporter
NewJSONExporter returns an Exporter to emit JSON.
pkg/cmdutil/json_flags.go:210
↓ 40 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
↓ 40 callers
Method
WarningIcon
()
pkg/iostreams/color.go:200
↓ 39 callers
Function
NewWithHost
NewWithHost is like New with an explicit host name
internal/ghrepo/repo.go:26
↓ 39 callers
Function
WithHeader
WithHeader defines the column names for a table. Panics if columns is nil or empty.
internal/tableprinter/table_printer.go:92
↓ 38 callers
Function
MutuallyExclusive
(message string, conditions ...bool)
pkg/cmdutil/errors.go:47
↓ 38 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
↓ 38 callers
Function
initFakeHTTP
()
pkg/cmd/pr/merge/merge_test.go:303
↓ 37 callers
Method
Browse
(string)
pkg/cmd/gist/view/view.go:23
↓ 37 callers
Method
Helper
()
pkg/httpmock/registry.go:57
↓ 37 callers
Method
SetQuery
SetQuery sets the query parameter key to value, replacing any existing value.
internal/safeurl/safeurl.go:87
↓ 35 callers
Method
Add
(string)
pkg/cmd/status/status.go:168
↓ 35 callers
Method
Get
(url string)
pkg/cmd/attestation/api/client.go:63
↓ 35 callers
Method
Title
()
pkg/cmd/pr/shared/templates.go:121
↓ 34 callers
Function
DisplayURL
DisplayURL returns a copy of the string urlStr removing everything except the scheme, hostname, and path. If the scheme is not specified, "https" is a
internal/text/text.go:71
↓ 34 callers
Method
Error
()
pkg/cmd/repo/autolink/view/view_test.go:110
↓ 34 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:57
↓ 34 callers
Function
NewNoResultsError
(message string)
pkg/cmdutil/errors.go:68
↓ 34 callers
Function
baseRepo
(owner, repo, branch string)
pkg/cmd/pr/merge/merge_test.go:236
↓ 34 callers
Function
newTestManager
(dataDir, updateDir string, client *http.Client, gitClient gitClient, ios *iostreams.IOStreams)
pkg/cmd/extension/manager_test.go:41
↓ 34 callers
Function
runCommand
TODO port to new style tests
pkg/cmd/pr/merge/merge_test.go:251
↓ 33 callers
Function
IsSame
IsSame compares two GitHub repositories
internal/ghrepo/repo.go:79
↓ 32 callers
Method
DisplayName
()
api/queries_repo.go:1162
↓ 32 callers
Function
EnableRepoOverride
(cmd *cobra.Command, f *Factory)
pkg/cmdutil/repo_override.go:36
↓ 32 callers
Method
Helper
()
internal/run/stub.go:16
next →
1–100 of 5,846, ranked by callers