MCPcopy Create free account

hub / github.com/cli/cli / functions

Functions7,487 in github.com/cli/cli

↓ 16 callersFunctionRender
(text string, opts ...glamour.TermRendererOption)
pkg/markdown/markdown.go:38
↓ 16 callersFunctionWithHeader
WithHeader sets a header on the request, taking precedence over any header of the same name that the underlying transport would otherwise supply.
api/client.go:68
↓ 16 callersFunctionWithTheme
(theme string)
pkg/markdown/markdown.go:30
↓ 16 callersFunctionWithWrap
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
↓ 16 callersMethoddo
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 callersMethodsetHeaders
setHeaders sets the required headers for the API.
internal/codespaces/api/api.go:1293
↓ 15 callersMethodActiveToken
ActiveToken retrieves the active credential for the given hostname, searching environment variables, general configuration, and finally encrypted stor
internal/gh/gh.go:240
↓ 15 callersFunctionBeginTelemetry
BeginTelemetry starts an attachment event at full sampling for the raw supplied count. A zero count returns nil without changing sampling. recorder is
internal/attachments/telemetry.go:15
↓ 15 callersMethodConfirm
(string, bool)
pkg/cmd/repo/edit/edit.go:30
↓ 15 callersMethodGetOrDefault
(hostname, key string)
internal/config/config.go:78
↓ 15 callersFunctionRESTPayload
(responseStatus int, responseBody string, cb func(payload map[string]any))
pkg/httpmock/stub.go:201
↓ 15 callersFunctionapiRun
(opts *ApiOptions)
pkg/cmd/api/api.go:313
↓ 15 callersFunctionnewTestDiscussionClient
(reg *httpmock.Registry)
pkg/cmd/discussion/client/client_test.go:17
↓ 15 callersFunctionrunList
(config listConfig)
pkg/cmd/project/list/list.go:78
↓ 15 callersFunctionstubPR
repo: either "baseOwner/baseRepo" or "baseOwner/baseRepo:defaultBranch" prHead: "headOwner/headRepo:headBranch"
pkg/cmd/pr/checkout/checkout_test.go:122
↓ 14 callersMethodError
()
internal/run/run.go:78
↓ 14 callersFunctionGet
Get secret from keyring given service and user name.
internal/keyring/keyring.go:37
↓ 14 callersMethodHasLocalBranch
(string)
pkg/cmd/repo/sync/git.go:15
↓ 14 callersMethodRESTWithNext
(hostname, method, p string, body io.Reader, data any)
pkg/cmd/attestation/api/client.go:58
↓ 14 callersMethodUnwrap
()
internal/run/run.go:86
↓ 14 callersFunctioncleanup
(github: EventsGitHub, journal: Journal, journalPath: string, subscriber = github)
evals/src/suites/events/fixtures.ts:108
↓ 14 callersFunctioninitFakeHTTP
()
pkg/cmd/pr/status/status_test.go:89
↓ 14 callersFunctionrequireKeyWithValue
(t *testing.T, cfg *ghConfig.Config, keys []string, value string)
internal/config/auth_config_test.go:686
↓ 13 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:263
↓ 13 callersMethodColorEnabled
()
pkg/iostreams/iostreams.go:101
↓ 13 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:39
↓ 13 callersFunctionFuzzyAgo
(a, b time.Time)
internal/text/text.go:46
↓ 13 callersFunctionGitHubRepo
(client *Client, repo ghrepo.Interface)
api/queries_repo.go:360
↓ 13 callersMethodGitProtocol
GitProtocol returns the configured git protocol, optionally scoped by host.
internal/gh/gh.go:55
↓ 13 callersMethodIsLocal
()
pkg/extensions/extension.go:27
↓ 13 callersFunctionNewHTTPClient
(opts HTTPClientOptions)
api/http_client.go:59
↓ 13 callersFunctionNewPortForwarder
NewPortForwarder returns a new PortForwarder for the specified codespace.
internal/codespaces/portforwarder/port_forwarder.go:56
↓ 13 callersFunctionParse
Parse extracts YAML frontmatter from a SKILL.md file. Frontmatter is delimited by --- on its own lines.
internal/skills/frontmatter/frontmatter.go:31
↓ 13 callersFunctionParseURL
ParseURL normalizes git remote urls
git/url.go:29
↓ 13 callersMethodPrintln
Println writes the arguments to the stderr writer with a newline at the end.
pkg/cmd/attestation/io/handler.go:45
↓ 13 callersMethodRunWithProgress
(label string, run func() error)
pkg/cmd/codespace/common.go:63
↓ 13 callersMethodfileURL
()
git/client_test.go:1608
↓ 13 callersMethodfind
(args []string)
internal/run/stub.go:89
↓ 13 callersFunctionnewBareTestRepo
(t *testing.T)
git/client_test.go:1560
↓ 13 callersFunctionnewTestHuhPrompter
--- Test harness ---
internal/prompter/huh_prompter_test.go:150
↓ 13 callersFunctionnewUsageError
(format string, args ...any)
script/ghmock/main.go:184
↓ 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 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 callersFunctionAddFlag
AddFlag registers the repeatable --attach flag on cmd.
internal/attachments/flags.go:29
↓ 12 callersMethodColorFromString
(s string)
pkg/iostreams/color.go:236
↓ 12 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:128
↓ 12 callersMethodError
()
internal/config/migration/multi_account.go:19
↓ 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 callersMethodIsStderrTTY
()
pkg/iostreams/iostreams.go:199
↓ 12 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
↓ 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 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:330
↓ 12 callersMethodSkip
()
internal/prompter/multi_select_with_search.go:396
↓ 12 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
↓ 12 callersMethodSub
Sub creates and opens a rooted subdirectory.
internal/safepaths/root.go:121
↓ 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 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:85
↓ 12 callersFunctionenter
()
internal/prompter/huh_prompter_test.go:73
↓ 12 callersFunctionnewInteraction
(steps ...interactionStep)
internal/prompter/huh_prompter_test.go:31
↓ 12 callersFunctionnewTestConfig
()
internal/config/config_test.go:13
↓ 12 callersFunctionopenState
()
script/ghmock/store.go:133
↓ 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 callersFunctionstubDeviceID
(id string)
internal/telemetry/telemetry_test.go:23
↓ 12 callersMethodupgradeExtension
(ext *Extension, force bool)
pkg/cmd/extension/manager.go:521
↓ 11 callersMethodActiveToken
(string)
api/http_client.go:23
↓ 11 callersMethodAuthenticatedCommand
AuthenticatedCommand is a wrapper around Command that included configuration to use gh as the credential helper for git.
git/client.go:136
↓ 11 callersMethodCyanf
(t string, args ...any)
pkg/iostreams/color.go:170
↓ 11 callersMethodError
()
pkg/cmd/release/create/http.go:37
↓ 11 callersMethodError
()
pkg/cmd/extension/manager.go:39
↓ 11 callersMethodFd
()
pkg/iostreams/iostreams.go:35
↓ 11 callersFunctionFormatRemoteURL
(repo Interface, protocol string)
internal/ghrepo/repo.go:95
↓ 11 callersMethodHosts
Hosts retrieves a list of known hosts.
internal/gh/gh.go:266
↓ 11 callersMethodInit
()
pkg/cmd/extension/browse/model.go:141
↓ 11 callersFunctionInitRepoHostname
(repo *Repository, hostname string)
api/queries_repo.go:573
↓ 11 callersMethodIsPullRequest
IsPullRequest reports whether number in repo is a pull request rather than an issue, with one lookup.
pkg/cmd/issue/artifact/client/client.go:25
↓ 11 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
↓ 11 callersFunctionReadFile
(filename string, stdin io.ReadCloser)
pkg/cmdutil/file_input.go:9
↓ 11 callersFunctionRegisterBranchCompletionFlags
RegisterBranchCompletionFlags suggests and autocompletes known remote git branches for flags passed
pkg/cmdutil/flags.go:53
↓ 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 callersFunctionWithHost
(matcher Matcher, host string)
pkg/httpmock/stub.go:136
↓ 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 callersMethodmatch
match finds the documented path template for a request. Literal segments beat parameters, so /repos/{owner}/{repo}/issues beats repos/{owner}/{repo}/{
script/ghmock/restcheck.go:98
↓ 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
↓ 11 callersFunctionwriteFile
(path string, write func(io.Writer) error)
script/ghmock/export.go:162
↓ 10 callersFunctionDetermineEditor
TODO: consider passing via Factory TODO: support per-hostname settings
pkg/cmdutil/legacy.go:12
↓ 10 callersMethodDo
(req *http.Request)
internal/barista/observability/telemetry.twirp.go:540
↓ 10 callersMethodExitCode
()
pkg/cmd/repo/create/create.go:30
↓ 10 callersFunctionExpectLines
Deprecated: prefer exact matches for command output
test/helpers.go:49
↓ 10 callersFunctionFlagErrorWrap
FlagErrorWrap returns a new FlagError that wraps the specified error.
pkg/cmdutil/errors.go:17
↓ 10 callersMethodIsNone
IsNone returns true if the [Option] is a [None] variant.
pkg/option/option.go:116
← previousnext →201–300 of 7,487, ranked by callers