MCPcopy Create free account

hub / github.com/cli/cli / functions

Functions6,141 in github.com/cli/cli

↓ 13 callersMethodRunWithProgress
(label string, run func() error)
pkg/cmd/codespace/common.go:63
↓ 13 callersFunctionnewTestHuhPrompter
--- Test harness ---
internal/prompter/huh_prompter_test.go:150
↓ 13 callersFunctionrequireKeyWithValue
(t *testing.T, cfg *ghConfig.Config, keys []string, value string)
internal/config/auth_config_test.go:670
↓ 13 callersFunctionrunCommand
** LEGACY TESTS **/
pkg/cmd/pr/checkout/checkout_test.go:856
↓ 13 callersFunctionrunCommand
(rt http.RoundTripper, branch string, isTTY bool, cli string)
pkg/cmd/pr/status/status_test.go:26
↓ 13 callersFunctionstubExtension
(path string)
pkg/cmd/extension/manager_test.go:1516
↓ 12 callersMethodActiveToken
(string)
api/http_client.go:18
↓ 12 callersFunctionAddCodespaceSelector
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 callersMethodColorFromString
(s string)
pkg/iostreams/color.go:236
↓ 12 callersMethodCreate
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 callersMethodError
()
pkg/cmd/extension/manager.go:39
↓ 12 callersFunctionExpectCommandToSupportJSONFields
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 callersFunctionFromURL
FromURL extracts the GitHub repository information from a git remote URL
internal/ghrepo/repo.go:61
↓ 12 callersMethodInstall
(ghrepo.Interface, string)
pkg/extensions/extension.go:34
↓ 12 callersFunctionNewSearcher
(client *http.Client, host string, detector fd.Detector)
pkg/search/searcher.go:57
↓ 12 callersFunctionNewTestClient
()
pkg/cmd/attestation/api/mock_client.go:62
↓ 12 callersFunctionParseURL
ParseURL normalizes git remote urls
git/url.go:29
↓ 12 callersFunctionSet
Set secret in keyring for user.
internal/keyring/keyring.go:22
↓ 12 callersFunctionUnexpectedStatusError
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 callersMethodUnwrap
()
internal/run/run.go:87
↓ 12 callersFunctionenter
()
internal/prompter/huh_prompter_test.go:73
↓ 12 callersFunctionnewInteraction
(steps ...interactionStep)
internal/prompter/huh_prompter_test.go:31
↓ 12 callersFunctionrunForm
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 callersFunctionrunList
(config listConfig)
pkg/cmd/project/item-list/item_list.go:133
↓ 12 callersMethodupgradeExtension
(ext *Extension, force bool)
pkg/cmd/extension/manager.go:520
↓ 12 callersMethodverify
(attestation *api.Attestation, policy verify.PolicyBuilder)
pkg/cmd/attestation/verification/sigstore.go:245
↓ 11 callersMethodColorEnabled
()
pkg/iostreams/iostreams.go:100
↓ 11 callersMethodCopy
()
git/client.go:64
↓ 11 callersMethodCyanf
(t string, args ...any)
pkg/iostreams/color.go:170
↓ 11 callersMethodDetectTerminalTheme
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 callersMethodDuration
(now time.Time)
pkg/cmd/run/shared/shared.go:121
↓ 11 callersMethodFd
()
pkg/iostreams/iostreams.go:34
↓ 11 callersFunctionFormatRemoteURL
(repo Interface, protocol string)
internal/ghrepo/repo.go:95
↓ 11 callersMethodHosts
Hosts retrieves a list of known hosts.
internal/gh/gh.go:168
↓ 11 callersFunctionInitRepoHostname
(repo *Repository, hostname string)
api/queries_repo.go:573
↓ 11 callersFunctionRegisterBranchCompletionFlags
RegisterBranchCompletionFlags suggests and autocompletes known remote git branches for flags passed
pkg/cmdutil/flags.go:53
↓ 11 callersFunctionStructExportData
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 callersFunctionStubFetchRefSHA
(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string)
pkg/cmd/release/shared/fetch.go:322
↓ 11 callersMethodURL
(Query)
pkg/search/searcher.go:34
↓ 11 callersFunctioncheckStringContains
(t *testing.T, got, expected string)
internal/docs/docs_test.go:100
↓ 11 callersMethoddoQueryWithProgressIndicator
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 callersFunctioninitFakeHTTP
()
pkg/cmd/pr/list/list_test.go:73
↓ 11 callersFunctionnewTestConfig
()
internal/config/config_test.go:13
↓ 11 callersFunctionrunCommand
(rt http.RoundTripper, detector fd.Detector, isTTY bool, cli string)
pkg/cmd/pr/list/list_test.go:27
↓ 11 callersMethodrunForm
(form *huh.Form)
internal/prompter/huh_prompter.go:29
↓ 11 callersFunctionstubBinaryExtension
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 callersMethodActiveToken
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 callersFunctionAddFlag
AddFlag registers the repeatable --attach flag on cmd.
internal/attachments/flags.go:30
↓ 10 callersFunctionDetermineEditor
TODO: consider passing via Factory TODO: support per-hostname settings
pkg/cmdutil/legacy.go:12
↓ 10 callersMethodError
()
git/errors.go:30
↓ 10 callersMethodError
()
pkg/cmd/release/create/http.go:37
↓ 10 callersFunctionExpectLines
Deprecated: prefer exact matches for command output
test/helpers.go:49
↓ 10 callersFunctionFuzzyAgo
(a, b time.Time)
internal/text/text.go:46
↓ 10 callersMethodIsNone
IsNone returns true if the [Option] is a [None] variant.
pkg/option/option.go:116
↓ 10 callersFunctionIsolateConfig
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 callersFunctionNewLiveClient
(hc *http.Client, externalClient *http.Client, host string, l *ioconfig.Handler)
pkg/cmd/attestation/api/client.go:78
↓ 10 callersFunctionParseAbsolute
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 callersMethodRaw
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 callersMethodSetDefaultHost
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 callersMethodUploadAndAttach
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 callersFunctionWithHost
(matcher Matcher, host string)
pkg/httpmock/stub.go:136
↓ 10 callersMethodnewForm
(groups ...*huh.Group)
internal/prompter/huh_prompter.go:22
↓ 9 callersMethodActiveUser
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 callersMethodCopy
Copy writes the data from r into a file specified by name.
pkg/cmd/release/download/download.go:422
↓ 9 callersMethodExpect
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 callersFunctionGet
Get secret from keyring given service and user name.
internal/keyring/keyring.go:37
↓ 9 callersFunctionGetCodespaceConnection
GetCodespaceConnection waits until a codespace is able to be connected to and initializes a connection to it.
internal/codespaces/codespaces.go:60
↓ 9 callersMethodHasLocalBranch
(string)
pkg/cmd/repo/sync/git.go:15
↓ 9 callersMethodIsStderrTTY
()
pkg/iostreams/iostreams.go:198
↓ 9 callersFunctionJSONErrorResponse
JSONErrorResponse is a type-safe helper to avoid confusion around the provided argument.
pkg/httpmock/stub.go:187
↓ 9 callersMethodLabel
()
pkg/cmd/codespace/ports.go:137
↓ 9 callersFunctionNewApp
(io *iostreams.IOStreams, exe executable, apiClient apiClient, browser browser.Browser, remotes func() (clicon
pkg/cmd/codespace/common.go:40
↓ 9 callersFunctionNewHTTPClient
(opts HTTPClientOptions)
api/http_client.go:35
↓ 9 callersFunctionNewLiveSigstoreVerifier
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 callersFunctionNilBoolFlag
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 callersFunctionPullRequestGraphQL
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 callersMethodSwitchUser
SwitchUser switches the active user for a given hostname.
internal/gh/gh.go:188
↓ 9 callersMethodTokenFromKeyring
TokenFromKeyring will retrieve the auth token for the given hostname, only searching in encrypted storage.
internal/gh/gh.go:153
↓ 9 callersMethodnewForm
(groups ...*huh.Group)
internal/prompter/prompter.go:90
↓ 9 callersFunctionpreviewRun
(opts *PreviewOptions)
pkg/cmd/skills/preview/preview.go:128
↓ 9 callersFunctionsafeClose
(closer io.Closer, err *error)
pkg/cmd/codespace/common.go:140
↓ 9 callersFunctionsingleWorktree
(branch string)
pkg/cmd/pr/merge/merge_test.go:307
↓ 9 callersFunctionviewRun
(opts *ViewOptions)
pkg/cmd/repo/view/view.go:80
↓ 8 callersMethodAuthenticatedCommand
AuthenticatedCommand is a wrapper around Command that included configuration to use gh as the credential helper for git.
git/client.go:142
↓ 8 callersMethodBrowsedURL
()
internal/browser/stub.go:12
↓ 8 callersMethodDigestWithAlg
DigestWithAlg returns the digest:algorithm of the artifact
pkg/cmd/attestation/artifact/artifact.go:87
↓ 8 callersFunctionDisableTelemetry
(cmd *cobra.Command)
pkg/cmdutil/telemetry.go:50
↓ 8 callersMethodDo
(c *config.Config)
internal/config/migration/multi_account.go:86
↓ 8 callersMethodDo
(req *http.Request)
internal/barista/observability/telemetry.twirp.go:540
↓ 8 callersMethodFindByRepo
FindByRepo returns the first Remote that points to a specific GitHub repository
context/remote.go:28
↓ 8 callersFunctionFromFullNameWithHost
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 callersMethodGetOrDefault
GetOrDefault provides primitive access for fetching configuration values, optionally scoped by host.
internal/gh/gh.go:34
↓ 8 callersFunctionHostPrefix
(hostname string)
internal/ghinstance/host.go:102
↓ 8 callersMethodIsPullRequest
()
pkg/search/result.go:401
↓ 8 callersMethodIsStdinTTY
()
pkg/iostreams/iostreams.go:166
↓ 8 callersMethodMap
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 callersMethodMutedf
(t string, args ...any)
pkg/iostreams/color.go:92
↓ 8 callersFunctionNew
New creates a new API client connecting to the configured endpoints with the HTTP client.
internal/codespaces/api/api.go:72
↓ 8 callersFunctionNewHandler
(io *iostreams.IOStreams)
pkg/cmd/attestation/io/handler.go:17
↓ 8 callersFunctionNewUploader
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
← previousnext →201–300 of 6,141, ranked by callers