Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
7,487 in github.com/cli/cli
⨍
Functions
7,487
◇
Types & classes
1,526
↓ 16 callers
Function
Render
(text string, opts ...glamour.TermRendererOption)
pkg/markdown/markdown.go:38
↓ 16 callers
Function
WithHeader
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 callers
Function
WithTheme
(theme string)
pkg/markdown/markdown.go:30
↓ 16 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
↓ 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
Method
setHeaders
setHeaders sets the required headers for the API.
internal/codespaces/api/api.go:1293
↓ 15 callers
Method
ActiveToken
ActiveToken retrieves the active credential for the given hostname, searching environment variables, general configuration, and finally encrypted stor
internal/gh/gh.go:240
↓ 15 callers
Function
BeginTelemetry
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 callers
Method
Confirm
(string, bool)
pkg/cmd/repo/edit/edit.go:30
↓ 15 callers
Method
GetOrDefault
(hostname, key string)
internal/config/config.go:78
↓ 15 callers
Function
RESTPayload
(responseStatus int, responseBody string, cb func(payload map[string]any))
pkg/httpmock/stub.go:201
↓ 15 callers
Function
apiRun
(opts *ApiOptions)
pkg/cmd/api/api.go:313
↓ 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
Error
()
internal/run/run.go:78
↓ 14 callers
Function
Get
Get secret from keyring given service and user name.
internal/keyring/keyring.go:37
↓ 14 callers
Method
HasLocalBranch
(string)
pkg/cmd/repo/sync/git.go:15
↓ 14 callers
Method
RESTWithNext
(hostname, method, p string, body io.Reader, data any)
pkg/cmd/attestation/api/client.go:58
↓ 14 callers
Method
Unwrap
()
internal/run/run.go:86
↓ 14 callers
Function
cleanup
(github: EventsGitHub, journal: Journal, journalPath: string, subscriber = github)
evals/src/suites/events/fixtures.ts:108
↓ 14 callers
Function
initFakeHTTP
()
pkg/cmd/pr/status/status_test.go:89
↓ 14 callers
Function
requireKeyWithValue
(t *testing.T, cfg *ghConfig.Config, keys []string, value string)
internal/config/auth_config_test.go:686
↓ 13 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:263
↓ 13 callers
Method
ColorEnabled
()
pkg/iostreams/iostreams.go:101
↓ 13 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:39
↓ 13 callers
Function
FuzzyAgo
(a, b time.Time)
internal/text/text.go:46
↓ 13 callers
Function
GitHubRepo
(client *Client, repo ghrepo.Interface)
api/queries_repo.go:360
↓ 13 callers
Method
GitProtocol
GitProtocol returns the configured git protocol, optionally scoped by host.
internal/gh/gh.go:55
↓ 13 callers
Method
IsLocal
()
pkg/extensions/extension.go:27
↓ 13 callers
Function
NewHTTPClient
(opts HTTPClientOptions)
api/http_client.go:59
↓ 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
ParseURL
ParseURL normalizes git remote urls
git/url.go:29
↓ 13 callers
Method
Println
Println writes the arguments to the stderr writer with a newline at the end.
pkg/cmd/attestation/io/handler.go:45
↓ 13 callers
Method
RunWithProgress
(label string, run func() error)
pkg/cmd/codespace/common.go:63
↓ 13 callers
Method
fileURL
()
git/client_test.go:1608
↓ 13 callers
Method
find
(args []string)
internal/run/stub.go:89
↓ 13 callers
Function
newBareTestRepo
(t *testing.T)
git/client_test.go:1560
↓ 13 callers
Function
newTestHuhPrompter
--- Test harness ---
internal/prompter/huh_prompter_test.go:150
↓ 13 callers
Function
newUsageError
(format string, args ...any)
script/ghmock/main.go:184
↓ 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
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
Function
AddFlag
AddFlag registers the repeatable --attach flag on cmd.
internal/attachments/flags.go:29
↓ 12 callers
Method
ColorFromString
(s string)
pkg/iostreams/color.go:236
↓ 12 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:128
↓ 12 callers
Method
Error
()
internal/config/migration/multi_account.go:19
↓ 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
Method
IsStderrTTY
()
pkg/iostreams/iostreams.go:199
↓ 12 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
↓ 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
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:330
↓ 12 callers
Method
Skip
()
internal/prompter/multi_select_with_search.go:396
↓ 12 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
↓ 12 callers
Method
Sub
Sub creates and opens a rooted subdirectory.
internal/safepaths/root.go:121
↓ 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
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:85
↓ 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
newTestConfig
()
internal/config/config_test.go:13
↓ 12 callers
Function
openState
()
script/ghmock/store.go:133
↓ 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
Function
stubDeviceID
(id string)
internal/telemetry/telemetry_test.go:23
↓ 12 callers
Method
upgradeExtension
(ext *Extension, force bool)
pkg/cmd/extension/manager.go:521
↓ 11 callers
Method
ActiveToken
(string)
api/http_client.go:23
↓ 11 callers
Method
AuthenticatedCommand
AuthenticatedCommand is a wrapper around Command that included configuration to use gh as the credential helper for git.
git/client.go:136
↓ 11 callers
Method
Cyanf
(t string, args ...any)
pkg/iostreams/color.go:170
↓ 11 callers
Method
Error
()
pkg/cmd/release/create/http.go:37
↓ 11 callers
Method
Error
()
pkg/cmd/extension/manager.go:39
↓ 11 callers
Method
Fd
()
pkg/iostreams/iostreams.go:35
↓ 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:266
↓ 11 callers
Method
Init
()
pkg/cmd/extension/browse/model.go:141
↓ 11 callers
Function
InitRepoHostname
(repo *Repository, hostname string)
api/queries_repo.go:573
↓ 11 callers
Method
IsPullRequest
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 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
↓ 11 callers
Function
ReadFile
(filename string, stdin io.ReadCloser)
pkg/cmdutil/file_input.go:9
↓ 11 callers
Function
RegisterBranchCompletionFlags
RegisterBranchCompletionFlags suggests and autocompletes known remote git branches for flags passed
pkg/cmdutil/flags.go:53
↓ 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
WithHost
(matcher Matcher, host string)
pkg/httpmock/stub.go:136
↓ 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
Method
match
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 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
↓ 11 callers
Function
writeFile
(path string, write func(io.Writer) error)
script/ghmock/export.go:162
↓ 10 callers
Function
DetermineEditor
TODO: consider passing via Factory TODO: support per-hostname settings
pkg/cmdutil/legacy.go:12
↓ 10 callers
Method
Do
(req *http.Request)
internal/barista/observability/telemetry.twirp.go:540
↓ 10 callers
Method
ExitCode
()
pkg/cmd/repo/create/create.go:30
↓ 10 callers
Function
ExpectLines
Deprecated: prefer exact matches for command output
test/helpers.go:49
↓ 10 callers
Function
FlagErrorWrap
FlagErrorWrap returns a new FlagError that wraps the specified error.
pkg/cmdutil/errors.go:17
↓ 10 callers
Method
IsNone
IsNone returns true if the [Option] is a [None] variant.
pkg/option/option.go:116
← previous
next →
201–300 of 7,487, ranked by callers