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
↓ 1 callers
Function
mockReviewerResponse
mockReviewerResponse generates a GraphQL response for SuggestedReviewerActors tests. It creates suggestions (s1, s2...), collaborators (c1, c2...), an
api/queries_pr_test.go:146
↓ 1 callers
Function
mockReviewerResponseForRepo
mockReviewerResponseForRepo generates a GraphQL response for SuggestedReviewerActorsForRepo tests. It creates collaborators (c1, c2...) and teams (tea
api/queries_pr_test.go:381
↓ 1 callers
Function
mockSuccessfulEditResponse
(reg *httpmock.Registry, cb func(params map[string]any))
pkg/cmd/release/edit/edit_test.go:477
↓ 1 callers
Method
moveByPage
(direction int)
pkg/cmd/extension/browse/model.go:589
↓ 1 callers
Function
mp4Arg
()
internal/attachments/references_test.go:21
↓ 1 callers
Function
mustMarshal
(t *testing.T, v any)
pkg/cmd/send-telemetry/send_telemetry_test.go:221
↓ 1 callers
Function
mustParseQualifiedHeadRef
(ref string)
pkg/cmd/pr/shared/find_refs_resolution_test.go:504
↓ 1 callers
Function
mustParseQualifiedHeadRef
(ref string)
pkg/cmd/pr/create/create_test.go:2795
↓ 1 callers
Function
mustReadDir
(t *testing.T, path string)
internal/zip/zip_test.go:110
↓ 1 callers
Function
nameFromFile
nameFromFile returns the name gh gives an artifact from a file: its base name, as typed rather than a symlink's target, cleaned up to fit the server's
pkg/cmd/issue/artifact/create/create.go:422
↓ 1 callers
Function
needsBom
()
pkg/surveyext/editor_manual.go:30
↓ 1 callers
Function
nestedSuggestFunc
Display helpful error message in case subcommand name was mistyped. This matches Cobra's behavior for root command, which Cobra confusingly doesn't ap
pkg/cmd/root/help.go:64
↓ 1 callers
Function
newAttachableDocuments
newAttachableDocuments scans every document and refuses what no upload can fix, so that nothing uploads for a set of documents that cannot take it.
internal/attachments/attach.go:161
↓ 1 callers
Function
newAttachmentArgs
newAttachmentArgs describes each asset for the markdown half of the package, without a URL, since nothing has uploaded yet.
internal/attachments/attach.go:201
↓ 1 callers
Function
newAuthStatus
()
pkg/cmd/auth/status/status.go:58
↓ 1 callers
Function
newBlockingStream
(ctx context.Context)
pkg/cmd/event/listen/listen_test.go:197
↓ 1 callers
Function
newBody
newBody returns the body to save, checked against the artifact's type, or nil to keep the current body. Only a type that supports attachments takes --
pkg/cmd/issue/artifact/edit/edit.go:283
↓ 1 callers
Function
newBoolValue
(p **bool)
pkg/cmdutil/flags.go:100
↓ 1 callers
Function
newBrowser
(f *cmdutil.Factory)
pkg/cmd/factory/default.go:308
↓ 1 callers
Function
newCodeCmd
(app *App)
pkg/cmd/codespace/code.go:11
↓ 1 callers
Function
newCpCmd
(app *App)
pkg/cmd/codespace/ssh.go:710
↓ 1 callers
Function
newCustomVerifier
(trustedRoot *root.TrustedRoot)
pkg/cmd/attestation/verification/sigstore.go:314
↓ 1 callers
Function
newDefaultPushTarget
newDefaultPushTarget is a thin wrapper over defaultPushTarget to help with generic type inference, to reduce verbosity in repeating the parametric typ
pkg/cmd/pr/shared/find_refs_resolution.go:291
↓ 1 callers
Function
newDeleteCmd
(app *App)
pkg/cmd/codespace/delete.go:39
↓ 1 callers
Function
newFile
()
internal/skills/lockfile/lockfile.go:139
↓ 1 callers
Function
newFixtureRepositoryManager
(tsEnv testScriptEnv)
acceptance/fixture_repository_test.go:107
↓ 1 callers
Function
newGQLScaffolder
(schema *ast.Schema)
script/ghmock/gqlscaffold.go:61
↓ 1 callers
Function
newGitHubVerifier
(trustDomain string, tufMetadataDir o.Option[string], hc *http.Client)
pkg/cmd/attestation/verification/sigstore.go:337
↓ 1 callers
Function
newIdleReader
(body io.ReadCloser, timeout time.Duration)
pkg/cmd/event/listen/listen.go:553
↓ 1 callers
Function
newImageAsset
newImageAsset applies what only holds for an image: the author may write alt text, and the fallback mirrors the web uploader by stripping the extensio
internal/attachments/userasset.go:69
↓ 1 callers
Function
newJupyterCmd
(app *App)
pkg/cmd/codespace/jupyter.go:15
↓ 1 callers
Function
newLineSplitter
newLineSplitter returns a bufio.SplitFunc for SSE lines. The specification (9.2.5) allows three line endings: CR LF ("\r\n"), a lone LF ("\n"), or a l
internal/eventstream/sse.go:137
↓ 1 callers
Function
newLiveFixtureRepositoryClient
(tsEnv testScriptEnv)
acceptance/fixture_repository_test.go:36
↓ 1 callers
Function
newLogsCmd
(app *App)
pkg/cmd/codespace/logs.go:13
↓ 1 callers
Function
newMockGitClient
(t *testing.T, config func(*mockGitClient))
pkg/cmd/repo/sync/sync_test.go:768
↓ 1 callers
Function
newMockrelayServer
(opts ...relayServerOption)
internal/codespaces/connection/tunnels_api_server_mock.go:238
↓ 1 callers
Function
newMultiSelectSearchField
( title, searchTitle string, defaults, persistent []string, searchFunc func(string) MultiSelectSearchResult
internal/prompter/multi_select_with_search.go:78
↓ 1 callers
Function
newPortsCmd
newPortsCmd returns a Cobra "ports" command that displays a table of available ports, according to the specified flags.
pkg/cmd/codespace/ports.go:27
↓ 1 callers
Function
newPortsForwardCmd
NewPortsForwardCmd returns a Cobra "ports forward" subcommand, which forwards a set of port pairs from the codespace to localhost.
pkg/cmd/codespace/ports.go:301
↓ 1 callers
Function
newPortsVisibilityCmd
(app *App, selector *CodespaceSelector)
pkg/cmd/codespace/ports.go:219
↓ 1 callers
Function
newPrompter
(f *cmdutil.Factory)
pkg/cmd/factory/default.go:313
↓ 1 callers
Function
newPublicGoodVerifier
(tufMetadataDir o.Option[string], hc *http.Client)
pkg/cmd/attestation/verification/sigstore.go:371
↓ 1 callers
Function
newReadmeGetter
(client *http.Client, cacheTTL time.Duration)
pkg/cmd/extension/browse/rg.go:16
↓ 1 callers
Function
newRebuildCmd
(app *App)
pkg/cmd/codespace/rebuild.go:15
↓ 1 callers
Function
newRunID
(start time.Time)
script/ghmock/run.go:596
↓ 1 callers
Function
newSCPCommand
newSCPCommand populates an exec.Cmd to run an scp command for the files specified in cmdArgs. cmdArgs is parsed such that scp flags precede the files
internal/codespaces/ssh.go:107
↓ 1 callers
Function
newSSHCmd
(app *App)
pkg/cmd/codespace/ssh.go:49
↓ 1 callers
Function
newSelectCmd
(app *App)
pkg/cmd/codespace/select.go:16
↓ 1 callers
Function
newServerOpts
(opts []interface{})
internal/barista/observability/telemetry.twirp.go:571
↓ 1 callers
Function
newSocketConn
(conn *websocket.Conn)
internal/codespaces/connection/tunnels_api_server_mock.go:446
↓ 1 callers
Function
newStopCmd
(app *App)
pkg/cmd/codespace/stop.go:19
↓ 1 callers
Function
newStringValue
(p **string)
pkg/cmdutil/flags.go:76
↓ 1 callers
Function
newTestAccessiblePrompter
(t *testing.T, console *expect.Console)
internal/prompter/accessible_prompter_test.go:886
↓ 1 callers
Function
newTestIOStreams
(t *testing.T, console *expect.Console, spinnerDisabled bool)
pkg/iostreams/iostreams_progress_indicator_test.go:178
↓ 1 callers
Function
newTestSurveyPrompter
(t *testing.T, console *expect.Console)
internal/prompter/accessible_prompter_test.go:895
↓ 1 callers
Function
newTestVirtualTerminal
(t *testing.T)
pkg/iostreams/iostreams_progress_indicator_test.go:152
↓ 1 callers
Function
newTrafficMonitor
newTrafficMonitor returns a trafficMonitor for the specified codespace connection. It wraps the provided io.ReaderWriteCloser with its own Read/Write/
internal/codespaces/portforwarder/port_forwarder.go:435
↓ 1 callers
Function
newTunnelListener
(addr net.Addr)
script/ghmock/tls.go:147
↓ 1 callers
Function
newUploadError
newUploadError captures the status code so the message can name what the endpoint refused.
internal/attachments/client.go:155
↓ 1 callers
Function
newVideoAsset
newVideoAsset applies what only holds for a video: a player has no alt attribute to fill, so the author cannot supply one, and the name that stands in
internal/attachments/userasset.go:104
↓ 1 callers
Function
newZipLogMap
()
pkg/cmd/run/view/logs.go:164
↓ 1 callers
Function
noResults
noResults returns an empty JSON array for exporters or a no-results error.
pkg/cmd/skills/search/search.go:359
↓ 1 callers
Function
noResultsMessage
noResultsMessage returns an appropriate "no results" message.
pkg/cmd/skills/search/search.go:271
↓ 1 callers
Function
nonBlockingOpenFlag
()
internal/safepaths/open_nonblock_unix.go:10
↓ 1 callers
Function
normalizeBuildTags
(tags string)
script/build.go:135
↓ 1 callers
Function
normalizeDir
(d string)
pkg/cmd/extension/command_test.go:973
↓ 1 callers
Function
normalizeExtensionSelector
(n string)
pkg/cmd/extension/command.go:716
↓ 1 callers
Function
normalizeHost
(host string)
internal/skills/source/source.go:70
↓ 1 callers
Function
normalizeJSON
(j []byte)
pkg/cmd/codespace/ports.go:397
↓ 1 callers
Function
normalizeTask
(t string)
script/build.go:269
↓ 1 callers
Function
nullability
nullability says whether a field's value can be null, or for input fields, whether the field is required.
script/ghmock/schemacmd.go:185
↓ 1 callers
Function
numbered
(n int)
script/ghmock/run_test.go:1688
↓ 1 callers
Function
numbers
numbers returns the numbers from first to last.
pkg/cmd/issue/artifact/client/client_test.go:860
↓ 1 callers
Function
observedAt
(evidence: Evidence, action: Action, call: GhCall)
evals/src/suites/events/grading/observations.ts:139
↓ 1 callers
Function
observedProcess
(t: TestContext, source: string)
evals/src/harness.test.ts:31
↓ 1 callers
Function
offSchema
(e loggedRequest)
script/ghmock/run_test.go:1683
↓ 1 callers
Function
ok
(stdout: string)
evals/src/smoke.test.ts:86
↓ 1 callers
Function
onlyIn
onlyIn lists the fields in a that b doesn't ask for. A new object is listed once, without the fields inside it.
script/ghmock/trim.go:192
↓ 1 callers
Method
openDir
openDir opens the directory the file at path goes in, through safepaths, creating it and any missing parents: Dir, or with Output, the file's parent d
pkg/cmd/issue/artifact/download/download.go:455
↓ 1 callers
Function
openInBrowser
(opts *ListOptions, repo ghrepo.Interface)
pkg/cmd/discussion/list/list.go:268
↓ 1 callers
Function
openInBrowser
openInBrowser opens a document's page on GitHub, or a link's URL. The page comes from the API, so the message shows it like gh issue view --web does.
pkg/cmd/issue/artifact/view/view.go:169
↓ 1 callers
Method
openVerifiedDirectory
(parent *os.Root, name, displayPath string)
internal/safepaths/root.go:358
↓ 1 callers
Method
openVerifiedEntry
(parent *os.Root, name, displayPath string)
internal/safepaths/root.go:401
↓ 1 callers
Function
operationName
operationName resolves the requested operation, or the document's sole operation when no name is supplied. Invalid selections retain the supplied name
script/ghmock/request.go:92
↓ 1 callers
Method
optionalSeconds
optionalSeconds reads a raw lifetime in seconds (an ExpiresIn field) from config, returning 0 when the key is absent so a credential without the value
internal/config/refreshable.go:287
↓ 1 callers
Method
optionalTimestamp
(path []string)
internal/config/refreshable.go:302
↓ 1 callers
Method
otherBinScaffolding
(name string)
pkg/cmd/extension/manager.go:646
↓ 1 callers
Function
pagerConfig
()
internal/ghcmd/cmd_test.go:599
↓ 1 callers
Function
paginate
paginate slices results to the requested page window.
pkg/cmd/skills/search/search.go:408
↓ 1 callers
Method
paginateOrgLogins
paginateOrgLogins after cursor and append them to the list of logins.
pkg/cmd/project/shared/queries/queries.go:1400
↓ 1 callers
Function
parse
(argv: string[])
evals/src/smoke.ts:35
↓ 1 callers
Function
parseArgv
(args: string[], spec: ArgvSpec = {})
evals/src/core/calls.ts:56
↓ 1 callers
Function
parseArtifactURL
parseArtifactURL reads an artifact URL into its repository, issue number and artifact number. Like an issue URL, it may be http, and its query and fra
pkg/cmd/issue/artifact/shared/shared.go:172
↓ 1 callers
Function
parseArtifactURLs
parseArtifactURLs reads every argument as an artifact URL on the same issue.
pkg/cmd/issue/artifact/shared/shared.go:147
↓ 1 callers
Function
parseCheckStatusFromCheckConclusionState
(state CheckConclusionState)
api/queries_pr.go:473
↓ 1 callers
Function
parseCheckStatusFromCheckRunState
(state CheckRunState)
api/queries_pr.go:456
↓ 1 callers
Function
parseCheckStatusFromStatusState
(state StatusState)
api/queries_pr.go:440
↓ 1 callers
Function
parseFields
TODO copypasta from gh api
pkg/cmd/workflow/run/run.go:171
↓ 1 callers
Function
parseGitHubURL
parseGitHubURL extracts owner/repo from a GitHub remote URL. Only github.com and GHEC data residency (*.ghe.com) URLs are recognized.
pkg/cmd/skills/publish/publish.go:1000
↓ 1 callers
Function
parseGraphQL
(body []byte)
script/ghmock/request.go:72
← previous
next →
3,501–3,600 of 7,487, ranked by callers