Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
6,064 in github.com/cli/cli
⨍
Functions
6,064
◇
Types & classes
1,322
↓ 32 callers
Method
Error
()
pkg/cmd/secret/shared/base_repo.go:17
↓ 31 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:177
↓ 31 callers
Function
NewMockPrompter
(t *testing.T)
internal/prompter/test.go:12
↓ 31 callers
Method
Wait
()
pkg/cmd/extension/browse/browse.go:101
↓ 30 callers
Function
NoSuchPromptErr
(prompt string)
internal/prompter/test.go:171
↓ 30 callers
Function
StringEnumFlag
StringEnumFlag defines a new string flag that only allows values listed in options.
pkg/cmdutil/flags.go:28
↓ 29 callers
Function
FileResponse
(filename string)
pkg/httpmock/stub.go:191
↓ 29 callers
Function
NewTestHandler
()
pkg/cmd/attestation/io/handler.go:27
↓ 29 callers
Function
newTestClient
(reg *httpmock.Registry)
api/client_test.go:17
↓ 28 callers
Method
Muted
(t string)
pkg/iostreams/color.go:71
↓ 28 callers
Method
Open
(key string)
pkg/cmd/run/view/view.go:68
↓ 27 callers
Method
SuccessIconWithColor
(colo func(string) string)
pkg/iostreams/color.go:196
↓ 25 callers
Method
Do
(*http.Request)
pkg/cmd/release/shared/upload.go:24
↓ 25 callers
Method
FailureIcon
()
pkg/iostreams/color.go:204
↓ 25 callers
Method
Remove
(name string)
pkg/extensions/extension.go:37
↓ 25 callers
Method
StartProgressIndicatorWithLabel
(s string)
internal/codespaces/codespaces.go:46
↓ 25 callers
Function
WithHeader
(responder Responder, header string, value string)
pkg/httpmock/stub.go:145
↓ 24 callers
Method
Done
()
pkg/cmd/extension/browse/browse.go:100
↓ 24 callers
Function
Pluralize
(num int, thing string)
internal/text/text.go:42
↓ 24 callers
Function
RESTPrefix
(hostname string)
internal/ghinstance/host.go:59
↓ 24 callers
Method
TerminalWidth
TerminalWidth returns the width of the terminal that controls the process
pkg/iostreams/iostreams.go:425
↓ 23 callers
Method
Error
()
pkg/cmd/config/set/set.go:105
↓ 23 callers
Method
Find
(opts FindOptions)
pkg/cmd/pr/shared/finder.go:30
↓ 23 callers
Function
NewMockConfigFromString
NewMockConfigFromString returns a mock config populated from cfgString, for tests that need to stub config behaviour by assigning to the mock's functi
internal/config/test.go:31
↓ 23 callers
Function
NormalizeRelativePath
(posixPath string)
pkg/cmd/attestation/test/path.go:8
↓ 22 callers
Function
AddFormatFlags
(cmd *cobra.Command, exportTarget *Exporter)
pkg/cmdutil/json_flags.go:146
↓ 22 callers
Function
NewStringSet
()
pkg/set/string_set.go:10
↓ 22 callers
Function
QueryMatcher
(method string, path string, query url.Values)
pkg/httpmock/stub.go:91
↓ 22 callers
Method
SetFields
(fields []string)
pkg/cmdutil/json_flags.go:218
↓ 22 callers
Function
createCommandContext
(t *testing.T, exitStatus int, stdout, stderr string)
git/client_test.go:2139
↓ 21 callers
Function
DisableAuthCheck
(cmd *cobra.Command)
pkg/cmdutil/auth_check.go:13
↓ 21 callers
Function
NewCachedHTTPClient
(httpClient *http.Client, ttl time.Duration)
api/http_client.go:133
↓ 21 callers
Method
Red
(t string)
pkg/iostreams/color.go:96
↓ 21 callers
Method
ToSlice
()
pkg/cmd/status/status.go:170
↓ 21 callers
Method
Yellow
(t string)
pkg/iostreams/color.go:107
↓ 21 callers
Method
fromEnv
()
acceptance/acceptance_test.go:570
↓ 21 callers
Function
testScriptParamsFor
(tsEnv testScriptEnv, command string)
acceptance/acceptance_test.go:250
↓ 20 callers
Method
Exclude
(t *testing.T, m Matcher)
pkg/httpmock/registry.go:32
↓ 20 callers
Method
Fields
()
pkg/cmdutil/json_flags.go:199
↓ 20 callers
Function
GenerateRepoURL
(repo Interface, p string, args ...any)
internal/ghrepo/repo.go:85
↓ 20 callers
Function
runEditItem
(config editItemConfig)
pkg/cmd/project/item-edit/item_edit.go:225
↓ 19 callers
Method
Copy
Copy copies files between the local and remote file systems. The mechanics are similar to 'ssh' but using 'scp'.
pkg/cmd/codespace/ssh.go:760
↓ 19 callers
Method
Error
()
internal/skills/discovery/discovery.go:340
↓ 19 callers
Method
Login
(string, string, string, string, bool)
pkg/cmd/auth/shared/login_flow.go:26
↓ 19 callers
Function
New
(f *cmdutil.Factory)
pkg/cmd/project/shared/client/client.go:10
↓ 19 callers
Method
NewOwner
NewOwner creates a project Owner If canPrompt is false, login is required as we cannot prompt for it. If login is not empty, it is used to lookup the
pkg/cmd/project/shared/queries/queries.go:1440
↓ 19 callers
Method
Remotes
()
pkg/cmd/extension/git.go:17
↓ 19 callers
Method
Write
Write persists modifications to the configuration.
internal/gh/gh.go:79
↓ 18 callers
Method
AddTimeField
AddTimeField in TTY mode displays the fuzzy time difference between now and t. In non-TTY mode it just displays t with the time.RFC3339 format.
internal/tableprinter/table_printer.go:26
↓ 18 callers
Method
AddValues
(values []string)
pkg/set/string_set.go:25
↓ 18 callers
Function
CurrentLoginName
(client *Client, hostname string)
api/queries_user.go:7
↓ 18 callers
Method
Error
()
acceptance/acceptance_test.go:555
↓ 18 callers
Method
Replace
(handle string)
pkg/cmd/pr/shared/params.go:310
↓ 17 callers
Method
ExportData
([]string)
pkg/cmd/project/shared/queries/queries.go:1843
↓ 17 callers
Method
Migrate
(m gh.Migration)
internal/config/config.go:183
↓ 17 callers
Function
ReplaceTripper
Replace http.Client transport layer with registry so all requests get recorded.
pkg/httpmock/registry.go:14
↓ 17 callers
Method
Verify
(t _testing, url string)
internal/browser/stub.go:24
↓ 17 callers
Method
list
(includeMetadata bool)
pkg/cmd/extension/manager.go:150
↓ 16 callers
Method
Cyan
(t string)
pkg/iostreams/color.go:163
↓ 16 callers
Method
Input
(prompt string, defaultValue string)
pkg/cmd/pr/shared/survey.go:39
↓ 16 callers
Function
NewFinder
(factory *cmdutil.Factory)
pkg/cmd/pr/shared/finder.go:58
↓ 16 callers
Function
NewMockFinder
(selector string, pr *api.PullRequest, repo ghrepo.Interface)
pkg/cmd/pr/shared/finder.go:624
↓ 16 callers
Method
NewProject
NewProject creates a project based on the owner and project number if canPrompt is false, number is required as we cannot prompt for it if number is 0
pkg/cmd/project/shared/queries/queries.go:1486
↓ 16 callers
Function
ReadFile
(filename string, stdin io.ReadCloser)
pkg/cmdutil/file_input.go:8
↓ 16 callers
Method
TerminalTheme
TerminalTheme returns "light", "dark", or "none" depending on the background color of the terminal.
pkg/iostreams/iostreams.go:144
↓ 16 callers
Method
do
do executes the given request and returns the response. It creates an opentracing span to track the length of the request.
internal/codespaces/api/api.go:1278
↓ 16 callers
Function
keyringServiceName
(hostname string)
internal/config/config.go:527
↓ 16 callers
Method
setHeaders
setHeaders sets the required headers for the API.
internal/codespaces/api/api.go:1293
↓ 15 callers
Method
Confirm
(prompt string, defaultValue bool)
pkg/cmd/pr/shared/survey.go:42
↓ 15 callers
Method
Green
(t string)
pkg/iostreams/color.go:118
↓ 15 callers
Method
Name
()
pkg/extensions/extension.go:19
↓ 15 callers
Method
Println
Println writes the arguments to the stderr writer with a newline at the end.
pkg/cmd/attestation/io/handler.go:45
↓ 15 callers
Function
Render
(text string, opts ...glamour.TermRendererOption)
pkg/markdown/markdown.go:38
↓ 15 callers
Function
WithTheme
(theme string)
pkg/markdown/markdown.go:30
↓ 15 callers
Function
WithWrap
WithWrap is a rendering option that set the character limit for soft wrapping the markdown rendering. There is a max limit of 120 characters, unless t
pkg/markdown/markdown.go:19
↓ 15 callers
Function
newTestDiscussionClient
(reg *httpmock.Registry)
pkg/cmd/discussion/client/client_test.go:17
↓ 15 callers
Function
runList
(config listConfig)
pkg/cmd/project/list/list.go:78
↓ 15 callers
Function
stubPR
repo: either "baseOwner/baseRepo" or "baseOwner/baseRepo:defaultBranch" prHead: "headOwner/headRepo:headBranch"
pkg/cmd/pr/checkout/checkout_test.go:122
↓ 14 callers
Method
Clone
(cloneURL string, args []string)
pkg/cmd/extension/git.go:11
↓ 14 callers
Method
Confirm
(string, bool)
pkg/cmd/repo/edit/edit.go:31
↓ 14 callers
Method
Err
()
internal/codespaces/connection/tunnels_api_server_mock.go:288
↓ 14 callers
Function
ExactArgs
(n int, msg string)
pkg/cmdutil/args.go:24
↓ 14 callers
Function
NewIsolatedTestConfig
NewIsolatedTestConfig returns the real config implementation, built from cfgString and isolated from the machine running the tests. Pass "" for a conf
internal/config/test.go:126
↓ 14 callers
Function
RemoveExcessiveWhitespace
RemoveExcessiveWhitespace returns a copy of the string s with excessive whitespace removed.
internal/text/text.go:30
↓ 14 callers
Function
apiRun
(opts *ApiOptions)
pkg/cmd/api/api.go:307
↓ 14 callers
Function
initFakeHTTP
()
pkg/cmd/pr/status/status_test.go:89
↓ 13 callers
Method
Error
()
internal/run/run.go:79
↓ 13 callers
Method
GetOrDefault
(hostname, key string)
internal/config/config.go:70
↓ 13 callers
Function
GitHubRepo
(client *Client, repo ghrepo.Interface)
api/queries_repo.go:361
↓ 13 callers
Method
GitProtocol
GitProtocol returns the configured git protocol, optionally scoped by host.
internal/gh/gh.go:49
↓ 13 callers
Function
NewPortForwarder
NewPortForwarder returns a new PortForwarder for the specified codespace.
internal/codespaces/portforwarder/port_forwarder.go:56
↓ 13 callers
Function
Parse
Parse extracts YAML frontmatter from a SKILL.md file. Frontmatter is delimited by --- on its own lines.
internal/skills/frontmatter/frontmatter.go:31
↓ 13 callers
Function
RESTPayload
(responseStatus int, responseBody string, cb func(payload map[string]any))
pkg/httpmock/stub.go:201
↓ 13 callers
Method
RESTWithNext
(hostname, method, p string, body io.Reader, data any)
pkg/cmd/attestation/api/client.go:58
↓ 13 callers
Method
RunWithProgress
(label string, run func() error)
pkg/cmd/codespace/common.go:63
↓ 13 callers
Function
StatusJSONResponse
StatusJSONResponse turns the given argument into a JSON response. The argument is not meant to be a JSON string, unless it's intentional.
pkg/httpmock/stub.go:175
↓ 13 callers
Function
newTestHuhPrompter
--- Test harness ---
internal/prompter/huh_prompter_test.go:150
↓ 13 callers
Function
requireKeyWithValue
(t *testing.T, cfg *ghConfig.Config, keys []string, value string)
internal/config/auth_config_test.go:670
↓ 13 callers
Function
runCommand
** LEGACY TESTS **/
pkg/cmd/pr/checkout/checkout_test.go:856
↓ 13 callers
Function
runCommand
(rt http.RoundTripper, branch string, isTTY bool, cli string)
pkg/cmd/pr/status/status_test.go:26
← previous
next →
101–200 of 6,064, ranked by callers