Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
6,141 in github.com/cli/cli
⨍
Functions
6,141
◇
Types & classes
1,328
↓ 13 callers
Method
RunWithProgress
(label string, run func() error)
pkg/cmd/codespace/common.go:63
↓ 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
↓ 13 callers
Function
stubExtension
(path string)
pkg/cmd/extension/manager_test.go:1516
↓ 12 callers
Method
ActiveToken
(string)
api/http_client.go:18
↓ 12 callers
Function
AddCodespaceSelector
AddCodespaceSelector adds persistent flags for selecting a codespace to the given command and returns a CodespaceSelector which applies them
pkg/cmd/codespace/codespace_selector.go:24
↓ 12 callers
Method
ColorFromString
(s string)
pkg/iostreams/color.go:236
↓ 12 callers
Method
Create
Create creates a discussion. The returned discussion may be non-nil even when err is non-nil, indicating a secondary mutation failure (e.g., labels).
pkg/cmd/discussion/client/client.go:42
↓ 12 callers
Method
Error
()
pkg/cmd/extension/manager.go:39
↓ 12 callers
Function
ExpectCommandToSupportJSONFields
ExpectCommandToSupportJSONFields asserts that the provided command supports exactly the provided fields. Ordering of the expected fields is not import
pkg/jsonfieldstest/jsonfieldstest.go:41
↓ 12 callers
Function
FromURL
FromURL extracts the GitHub repository information from a git remote URL
internal/ghrepo/repo.go:61
↓ 12 callers
Method
Install
(ghrepo.Interface, string)
pkg/extensions/extension.go:34
↓ 12 callers
Function
NewSearcher
(client *http.Client, host string, detector fd.Detector)
pkg/search/searcher.go:57
↓ 12 callers
Function
NewTestClient
()
pkg/cmd/attestation/api/mock_client.go:62
↓ 12 callers
Function
ParseURL
ParseURL normalizes git remote urls
git/url.go:29
↓ 12 callers
Function
Set
Set secret in keyring for user.
internal/keyring/keyring.go:22
↓ 12 callers
Function
UnexpectedStatusError
UnexpectedStatusError reports a successful response whose status the caller did not expect. The request methods on Client convert every non-2xx respo
api/client.go:295
↓ 12 callers
Method
Unwrap
()
internal/run/run.go:87
↓ 12 callers
Function
enter
()
internal/prompter/huh_prompter_test.go:73
↓ 12 callers
Function
newInteraction
(steps ...interactionStep)
internal/prompter/huh_prompter_test.go:31
↓ 12 callers
Function
runForm
runForm runs a huh form with the given interaction, returning any error. The form runs in a goroutine using bubbletea's real event loop via io.Pipe.
internal/prompter/huh_prompter_test.go:156
↓ 12 callers
Function
runList
(config listConfig)
pkg/cmd/project/item-list/item_list.go:133
↓ 12 callers
Method
upgradeExtension
(ext *Extension, force bool)
pkg/cmd/extension/manager.go:520
↓ 12 callers
Method
verify
(attestation *api.Attestation, policy verify.PolicyBuilder)
pkg/cmd/attestation/verification/sigstore.go:245
↓ 11 callers
Method
ColorEnabled
()
pkg/iostreams/iostreams.go:100
↓ 11 callers
Method
Copy
()
git/client.go:64
↓ 11 callers
Method
Cyanf
(t string, args ...any)
pkg/iostreams/color.go:170
↓ 11 callers
Method
DetectTerminalTheme
DetectTerminalTheme is a utility to call before starting the output pager so that the terminal background can be reliably detected.
pkg/iostreams/iostreams.go:127
↓ 11 callers
Method
Duration
(now time.Time)
pkg/cmd/run/shared/shared.go:121
↓ 11 callers
Method
Fd
()
pkg/iostreams/iostreams.go:34
↓ 11 callers
Function
FormatRemoteURL
(repo Interface, protocol string)
internal/ghrepo/repo.go:95
↓ 11 callers
Method
Hosts
Hosts retrieves a list of known hosts.
internal/gh/gh.go:168
↓ 11 callers
Function
InitRepoHostname
(repo *Repository, hostname string)
api/queries_repo.go:573
↓ 11 callers
Function
RegisterBranchCompletionFlags
RegisterBranchCompletionFlags suggests and autocompletes known remote git branches for flags passed
pkg/cmdutil/flags.go:53
↓ 11 callers
Function
StructExportData
Basic function that can be used with structs that need to implement the exportable interface. It has numerous limitations so verify that it works as e
pkg/cmdutil/json_flags.go:306
↓ 11 callers
Function
StubFetchRefSHA
(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string)
pkg/cmd/release/shared/fetch.go:322
↓ 11 callers
Method
URL
(Query)
pkg/search/searcher.go:34
↓ 11 callers
Function
checkStringContains
(t *testing.T, got, expected string)
internal/docs/docs_test.go:100
↓ 11 callers
Method
doQueryWithProgressIndicator
doQueryWithProgressIndicator wraps API calls with a progress indicator. The query name is used in the progress indicator label.
pkg/cmd/project/shared/queries/queries.go:94
↓ 11 callers
Function
initFakeHTTP
()
pkg/cmd/pr/list/list_test.go:73
↓ 11 callers
Function
newTestConfig
()
internal/config/config_test.go:13
↓ 11 callers
Function
runCommand
(rt http.RoundTripper, detector fd.Detector, isTTY bool, cli string)
pkg/cmd/pr/list/list_test.go:27
↓ 11 callers
Method
runForm
(form *huh.Form)
internal/prompter/huh_prompter.go:29
↓ 11 callers
Function
stubBinaryExtension
Given the path where an extension should be installed and a manifest struct, creates a fake binary extension on disk
pkg/cmd/extension/manager_test.go:1574
↓ 10 callers
Method
ActiveToken
ActiveToken will retrieve the active auth token for the given hostname, searching environment variables, general configuration, and finally encrypted
internal/gh/gh.go:142
↓ 10 callers
Function
AddFlag
AddFlag registers the repeatable --attach flag on cmd.
internal/attachments/flags.go:30
↓ 10 callers
Function
DetermineEditor
TODO: consider passing via Factory TODO: support per-hostname settings
pkg/cmdutil/legacy.go:12
↓ 10 callers
Method
Error
()
git/errors.go:30
↓ 10 callers
Method
Error
()
pkg/cmd/release/create/http.go:37
↓ 10 callers
Function
ExpectLines
Deprecated: prefer exact matches for command output
test/helpers.go:49
↓ 10 callers
Function
FuzzyAgo
(a, b time.Time)
internal/text/text.go:46
↓ 10 callers
Method
IsNone
IsNone returns true if the [Option] is a [None] variant.
pkg/option/option.go:116
↓ 10 callers
Function
IsolateConfig
IsolateConfig prevents the ambient git configuration from reaching tests that shell out to real git. https://git-scm.com/docs/git-config#ENVIRONMENT
git/test.go:12
↓ 10 callers
Function
NewLiveClient
(hc *http.Client, externalClient *http.Client, host string, l *ioconfig.Handler)
pkg/cmd/attestation/api/client.go:78
↓ 10 callers
Function
ParseAbsolute
ParseAbsolute takes a string path that may be relative and returns an Absolute that is guaranteed to be absolute, or an error.
internal/safepaths/absolute.go:17
↓ 10 callers
Method
Raw
Raw returns the unsanitized content. It is the explicit, greppable opt-out for non-terminal uses (hashing, writing to disk, piping). Never pass the re
pkg/iostreams/untrusted.go:49
↓ 10 callers
Method
SetDefaultHost
SetDefaultHost will override any host resolution and return the given host and source for all calls to DefaultHost. Use for testing purposes only.
internal/gh/gh.go:214
↓ 10 callers
Method
UploadAndAttach
UploadAndAttach uploads assets in order and stops at the first failure. It points existing references at the URLs of successful uploads and appends on
internal/attachments/attach.go:23
↓ 10 callers
Function
WithHost
(matcher Matcher, host string)
pkg/httpmock/stub.go:136
↓ 10 callers
Method
newForm
(groups ...*huh.Group)
internal/prompter/huh_prompter.go:22
↓ 9 callers
Method
ActiveUser
ActiveUser will retrieve the username for the active user at the given hostname. This will not be accurate if the oauth token is set from an environm
internal/gh/gh.go:165
↓ 9 callers
Method
Copy
Copy writes the data from r into a file specified by name.
pkg/cmd/release/download/download.go:422
↓ 9 callers
Method
Expect
Expect returns the underlying value for a [Some] variant, or panics with the provided message for a [None] variant.
pkg/option/option.go:128
↓ 9 callers
Function
Get
Get secret from keyring given service and user name.
internal/keyring/keyring.go:37
↓ 9 callers
Function
GetCodespaceConnection
GetCodespaceConnection waits until a codespace is able to be connected to and initializes a connection to it.
internal/codespaces/codespaces.go:60
↓ 9 callers
Method
HasLocalBranch
(string)
pkg/cmd/repo/sync/git.go:15
↓ 9 callers
Method
IsStderrTTY
()
pkg/iostreams/iostreams.go:198
↓ 9 callers
Function
JSONErrorResponse
JSONErrorResponse is a type-safe helper to avoid confusion around the provided argument.
pkg/httpmock/stub.go:187
↓ 9 callers
Method
Label
()
pkg/cmd/codespace/ports.go:137
↓ 9 callers
Function
NewApp
(io *iostreams.IOStreams, exe executable, apiClient apiClient, browser browser.Browser, remotes func() (clicon
pkg/cmd/codespace/common.go:40
↓ 9 callers
Function
NewHTTPClient
(opts HTTPClientOptions)
api/http_client.go:35
↓ 9 callers
Function
NewLiveSigstoreVerifier
NewLiveSigstoreVerifier creates a new LiveSigstoreVerifier struct that is used to verify artifacts and attestations against the Public Good, GitHub, o
pkg/cmd/attestation/verification/sigstore.go:61
↓ 9 callers
Function
NilBoolFlag
NilBoolFlag defines a new flag with a bool pointer receiver. This is useful for differentiating between the flag being explicitly set to a false value
pkg/cmdutil/flags.go:21
↓ 9 callers
Function
PullRequestGraphQL
PullRequestGraphQL constructs a GraphQL query fragment for a set of pull request fields. It will try to sanitize the fields to just those available on
api/query_builder.go:469
↓ 9 callers
Method
SwitchUser
SwitchUser switches the active user for a given hostname.
internal/gh/gh.go:188
↓ 9 callers
Method
TokenFromKeyring
TokenFromKeyring will retrieve the auth token for the given hostname, only searching in encrypted storage.
internal/gh/gh.go:153
↓ 9 callers
Method
newForm
(groups ...*huh.Group)
internal/prompter/prompter.go:90
↓ 9 callers
Function
previewRun
(opts *PreviewOptions)
pkg/cmd/skills/preview/preview.go:128
↓ 9 callers
Function
safeClose
(closer io.Closer, err *error)
pkg/cmd/codespace/common.go:140
↓ 9 callers
Function
singleWorktree
(branch string)
pkg/cmd/pr/merge/merge_test.go:307
↓ 9 callers
Function
viewRun
(opts *ViewOptions)
pkg/cmd/repo/view/view.go:80
↓ 8 callers
Method
AuthenticatedCommand
AuthenticatedCommand is a wrapper around Command that included configuration to use gh as the credential helper for git.
git/client.go:142
↓ 8 callers
Method
BrowsedURL
()
internal/browser/stub.go:12
↓ 8 callers
Method
DigestWithAlg
DigestWithAlg returns the digest:algorithm of the artifact
pkg/cmd/attestation/artifact/artifact.go:87
↓ 8 callers
Function
DisableTelemetry
(cmd *cobra.Command)
pkg/cmdutil/telemetry.go:50
↓ 8 callers
Method
Do
(c *config.Config)
internal/config/migration/multi_account.go:86
↓ 8 callers
Method
Do
(req *http.Request)
internal/barista/observability/telemetry.twirp.go:540
↓ 8 callers
Method
FindByRepo
FindByRepo returns the first Remote that points to a specific GitHub repository
context/remote.go:28
↓ 8 callers
Function
FromFullNameWithHost
FromFullNameWithHost is like FromFullName that defaults to a specific host for values that don't explicitly include a hostname.
internal/ghrepo/repo.go:52
↓ 8 callers
Method
GetOrDefault
GetOrDefault provides primitive access for fetching configuration values, optionally scoped by host.
internal/gh/gh.go:34
↓ 8 callers
Function
HostPrefix
(hostname string)
internal/ghinstance/host.go:102
↓ 8 callers
Method
IsPullRequest
()
pkg/search/result.go:401
↓ 8 callers
Method
IsStdinTTY
()
pkg/iostreams/iostreams.go:166
↓ 8 callers
Method
Map
Map turns the qualifiers into a slice-keyed map ready for query formatting. Multiple struct fields can share the same key when tagged with `qualifier:
pkg/search/query.go:249
↓ 8 callers
Method
Mutedf
(t string, args ...any)
pkg/iostreams/color.go:92
↓ 8 callers
Function
New
New creates a new API client connecting to the configured endpoints with the HTTP client.
internal/codespaces/api/api.go:72
↓ 8 callers
Function
NewHandler
(io *iostreams.IOStreams)
pkg/cmd/attestation/io/handler.go:17
↓ 8 callers
Function
NewUploader
NewUploader prepares uploads against targetRepository, the numeric REST id of the repository the assets are uploaded against, and viewerPermission, th
internal/attachments/client.go:39
← previous
next →
201–300 of 6,141, ranked by callers