Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
7,552 in github.com/cli/cli
⨍
Functions
7,552
◇
Types & classes
1,536
↓ 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
Function
HostPrefix
(hostname string)
internal/ghinstance/host.go:102
↓ 10 callers
Method
IsNone
IsNone returns true if the [Option] is a [None] variant.
pkg/option/option.go:116
↓ 10 callers
Function
NewLiveClient
(hc *http.Client, externalClient *http.Client, host string, l *ioconfig.Handler)
pkg/cmd/attestation/api/client.go:78
↓ 10 callers
Method
SetActiveToken
The following methods are only for testing and that is a design smell we should consider fixing. SetActiveToken will override any token resolution and
internal/gh/gh.go:338
↓ 10 callers
Method
SetSampleRate
(rate int)
internal/gh/ghtelemetry/telemetry.go:35
↓ 10 callers
Method
UpsertDimensions
(Dimensions)
internal/gh/ghtelemetry/telemetry.go:17
↓ 10 callers
Method
UserAssets
UserAssets validates the files named by the attachment flag, keeping them in the order they were written. It returns nothing when the flag was not pas
internal/attachments/flags.go:50
↓ 10 callers
Function
WithRepoDir
(repoDir string)
git/command.go:91
↓ 10 callers
Method
newForm
(groups ...*huh.Group)
internal/prompter/huh_prompter.go:22
↓ 10 callers
Function
requireNoKey
(t *testing.T, cfg *ghConfig.Config, keys []string)
internal/config/auth_config_test.go:697
↓ 10 callers
Method
withFreshConfigForRefresh
withFreshConfigForRefresh runs fn, a credential-store read-modify-write (a token refresh, or a logout that must not race one), while holding both an i
internal/config/refreshable.go:96
↓ 9 callers
Method
ActiveUser
(string)
pkg/cmd/auth/gitcredential/helper.go:20
↓ 9 callers
Method
Clean
Clean cleans the file path option values
pkg/cmd/attestation/verify/options.go:50
↓ 9 callers
Method
Copy
Copy writes the data from r into a file specified by name.
pkg/cmd/release/download/download.go:458
↓ 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
Method
ExpectFields
(fields []string)
pkg/cmd/pr/shared/finder.go:669
↓ 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
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:138
↓ 9 callers
Method
Logout
Logout will remove user, git protocol, and auth token for the given hostname. It will remove the auth token from the encrypted storage if it exists th
internal/gh/gh.go:297
↓ 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
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
NewTestAssets
NewTestAssets returns a UserAsset per name, resolved through --attach, which is the only way a command builds one. It writes each name into a tempora
internal/attachments/test.go:24
↓ 9 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:38
↓ 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
ScopesSuggestion
()
api/client.go:52
↓ 9 callers
Method
Size
()
pkg/iostreams/iostreams.go:49
↓ 9 callers
Method
TokenFromKeyring
TokenFromKeyring will retrieve the auth token for the given hostname, only searching in encrypted storage.
internal/gh/gh.go:252
↓ 9 callers
Method
api
(method: string, path: string, body?: unknown)
evals/src/core/github.ts:45
↓ 9 callers
Method
newForm
(groups ...*huh.Group)
internal/prompter/prompter.go:90
↓ 9 callers
Function
newTestClient
(t *testing.T, host string)
pkg/cmd/event/client/client_test.go:41
↓ 9 callers
Function
previewRun
(opts *PreviewOptions)
pkg/cmd/skills/preview/preview.go:128
↓ 9 callers
Function
refreshableServiceName
(hostname string)
internal/config/refreshable.go:713
↓ 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
stubDiscoverTree
stubDiscoverTree registers the single recursive-tree call used by DiscoverSkills.
pkg/cmd/skills/install/install_test.go:242
↓ 9 callers
Function
stubInstallFiles
stubInstallFiles registers subtree + blob stubs for installer.Install (one skill).
pkg/cmd/skills/install/install_test.go:250
↓ 9 callers
Function
viewRun
(opts *ViewOptions)
pkg/cmd/repo/view/view.go:80
↓ 8 callers
Method
Addr
()
script/ghmock/tls.go:165
↓ 8 callers
Method
BrowsedURL
()
internal/browser/stub.go:12
↓ 8 callers
Method
Commits
(Query)
pkg/search/searcher.go:31
↓ 8 callers
Method
CurrentBranch
()
pkg/cmd/repo/sync/git.go:10
↓ 8 callers
Method
DigestWithAlg
DigestWithAlg returns the digest:algorithm of the artifact
pkg/cmd/attestation/artifact/artifact.go:87
↓ 8 callers
Method
Do
(c *config.Config)
internal/config/migration/multi_account.go:95
↓ 8 callers
Method
Error
()
internal/attachments/client.go:177
↓ 8 callers
Method
FindByRepo
FindByRepo returns the first Remote that points to a specific GitHub repository
context/remote.go:28
↓ 8 callers
Method
Flush
()
pkg/cmd/pr/create/regexp_writer.go:54
↓ 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:39
↓ 8 callers
Method
IsRefreshable
IsRefreshable reports whether the credential carries a refresh token and can therefore be renewed by gh.
pkg/auth/credential.go:54
↓ 8 callers
Method
IsStdinTTY
()
pkg/iostreams/iostreams.go:167
↓ 8 callers
Function
Login
(opts *LoginOptions)
pkg/cmd/auth/shared/login_flow.go:80
↓ 8 callers
Method
LoginRefreshable
(string, string, gh.Credential, string, bool)
pkg/cmd/auth/shared/login_flow.go:27
↓ 8 callers
Method
LoginRefreshable
LoginRefreshable stores a refreshable credential for the given user, sets the git protocol, and marks the user active for the hostname. Like Login it
internal/gh/gh.go:290
↓ 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
NewArtifactClient
NewArtifactClient returns an ArtifactClient that sends its requests through httpClient.
pkg/cmd/issue/artifact/client/client.go:58
↓ 8 callers
Function
NewHandler
(io *iostreams.IOStreams)
pkg/cmd/attestation/io/handler.go:17
↓ 8 callers
Method
Next
Next blocks until a complete frame is read and returns it. It returns io.EOF when the stream ends; a frame that is not terminated by a blank line befo
internal/eventstream/sse.go:56
↓ 8 callers
Method
Options
()
pkg/cmd/project/shared/queries/queries.go:1030
↓ 8 callers
Method
Path
Extension Name without gh-
pkg/extensions/extension.go:20
↓ 8 callers
Function
ReadMarkdownBodyFile
ReadMarkdownBodyFile reads Markdown from path and returns its base directory for resolving local attachment references. Standard input has no base dir
pkg/cmdutil/file_input.go:22
↓ 8 callers
Method
RecordOperations
RecordOperations replaces, rather than adds to, the completed operation counts. Pass partial results before handling an upload error so successful wor
internal/attachments/telemetry.go:41
↓ 8 callers
Method
RemoveValues
(values []string)
pkg/set/string_set.go:53
↓ 8 callers
Function
RepoPartsFromNWO
RepoPartsFromNWO parses a raw "owner/repo" string and returns the owner and name unescaped. It returns an error unless nwo contains exactly one slash
internal/safeurl/safeurl.go:21
↓ 8 callers
Method
Setup
Setup configures git to use the newly obtained credential for the given hostname. If no credential helper is configured for the host, gh configures i
pkg/cmd/auth/shared/git_credential.go:196
↓ 8 callers
Function
StubFetchRelease
(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, responseBody string)
pkg/cmd/release/shared/fetch.go:301
↓ 8 callers
Function
StubUploadToHost
StubUploadToHost is StubUpload plus the host the request reached. The matchers compare the path only, so the host is asserted in the responder or not
internal/attachments/test.go:74
↓ 8 callers
Function
Truncate
(maxWidth int, s string)
internal/text/text.go:38
↓ 8 callers
Method
Update
Update updates 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
↓ 8 callers
Function
actorDisplayName
actorDisplayName returns a user-friendly display name for any actor. It handles bots (e.g. Copilot → "Copilot (AI)"), users with names ("login (Name)"
api/queries_repo.go:1151
↓ 8 callers
Method
commit
(t *testing.T, message string)
git/client_test.go:1602
↓ 8 callers
Function
handleResponse
handleResponse takes a ghAPI.HTTPError or ghAPI.GraphQLError and converts it into an HTTPError or GraphQLError respectively.
api/client.go:318
↓ 8 callers
Method
loadResponses
()
script/ghmock/store.go:160
↓ 8 callers
Function
mockEmptyV2ProjectItems
mockEmptyV2ProjectItems registers GraphQL queries to report an issue is not contained on any v2 projects.
pkg/cmd/issue/view/view_test.go:613
↓ 8 callers
Function
newProjectFromQueryWithoutItemsQuery
(source projectQueryWithoutQueryableItems)
pkg/cmd/project/shared/queries/queries.go:253
↓ 8 callers
Function
pathWithin
(root, path string)
script/ghmock/gitfixture.go:114
↓ 8 callers
Method
readLog
()
script/ghmock/store.go:211
↓ 8 callers
Method
refreshableForUser
refreshableForUser returns the refreshable credential stored for the user along with whether it came from secure storage. It prefers the secure keyrin
internal/config/refreshable.go:233
↓ 8 callers
Function
refreshablePath
(hostname, username string)
internal/config/refreshable.go:705
↓ 8 callers
Function
renderMan
renderMan will generate a man page for the given command and write it to w. The header argument may be nil, however obviously w may not.
internal/docs/man.go:96
↓ 8 callers
Function
runArchiveItem
(config archiveItemConfig)
pkg/cmd/project/item-archive/item_archive.go:91
↓ 8 callers
Function
runCommand
(rt http.RoundTripper, isTTY bool, cli string)
pkg/cmd/issue/view/view_test.go:77
↓ 8 callers
Function
runCommand
(rt http.RoundTripper, isTTY bool, cli string)
pkg/cmd/pr/close/close_test.go:62
↓ 8 callers
Function
runCreateField
(config createFieldConfig)
pkg/cmd/project/field-create/field_create.go:95
↓ 8 callers
Function
runView
(config viewConfig)
pkg/cmd/project/view/view.go:84
↓ 8 callers
Function
singleSkillTreeJSON
singleSkillTreeJSON returns tree entries for a single skill with the given name.
pkg/cmd/skills/install/install_test.go:301
↓ 8 callers
Function
verifyAssetRun
(config *VerifyAssetConfig)
pkg/cmd/release/verify-asset/verify_asset.go:123
↓ 8 callers
Function
viewRun
(opts *ViewOptions)
pkg/cmd/issue/view/view.go:105
↓ 7 callers
Method
Aliases
Aliases provides persistent storage and modification of command aliases.
internal/gh/gh.go:73
↓ 7 callers
Function
AssertTestTelemetryEvents
AssertTestTelemetryEvents verifies the completed invocation event shape.
internal/attachments/test.go:46
↓ 7 callers
Method
Begin
Begin records initial facts that can be updated until invocation completion.
internal/gh/ghtelemetry/telemetry.go:29
↓ 7 callers
Function
CheckHost
CheckHost refuses GitHub Enterprise Server, which doesn't support issue artifacts. Callers run it before any request, so the user gets this reason ins
pkg/cmd/issue/artifact/shared/shared.go:222
↓ 7 callers
Function
CheckIssue
CheckIssue refuses a pull request, since artifacts are only supported on issues. It makes one lookup, and callers run it before any artifact request.
pkg/cmd/issue/artifact/shared/shared.go:231
← previous
next →
301–400 of 7,552, ranked by callers