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
↓ 5 callers
Function
ParseQualifiedHeadRef
ParseQualifiedHeadRef takes strings of the form <owner>:<branch> or <branch> and returns a QualifiedHeadRef. If the form <owner>:<branch> is used, the
pkg/cmd/pr/shared/find_refs_resolution.go:55
↓ 5 callers
Function
PrintSuccess
PrintSuccess prints the line for an artifact the command acted on. In a terminal, the line is icon and message on stdout. Otherwise it is a piped line
pkg/cmd/issue/artifact/shared/results.go:34
↓ 5 callers
Method
Prompt
Prompt offers to set up gh as the git credential helper for hostname. On an expiring login the user can cancel the sign-in entirely, in which case the
pkg/cmd/auth/shared/git_credential.go:40
↓ 5 callers
Method
Pull
(remote, branch string)
pkg/cmd/extension/git.go:16
↓ 5 callers
Method
RecordGitProtocol
RecordGitProtocol captures the git operations protocol selected for the host, as "https" or "ssh", or "unset" when no protocol was explicitly selected
pkg/cmd/auth/shared/telemetry.go:50
↓ 5 callers
Method
RecordStorage
RecordStorage captures where the credential was stored: keyring when a secure store was used, plaintext otherwise.
pkg/cmd/auth/shared/telemetry.go:87
↓ 5 callers
Method
Reset
()
pkg/iostreams/color.go:228
↓ 5 callers
Function
ResolveGitRoot
ResolveGitRoot returns the git repository root using the provided client, falling back to the current working directory on error.
internal/skills/installer/installer.go:311
↓ 5 callers
Function
SSOURL
SSOURL returns the URL of a SAML SSO challenge received by the server for clients that use ExtractHeader to extract the value of the "X-GitHub-SSO" re
pkg/cmd/factory/default.go:350
↓ 5 callers
Method
SearchFeatures
()
internal/featuredetection/feature_detection.go:21
↓ 5 callers
Function
SelectRun
SelectRun prompts the user to select a run from a list of runs by using the recommended prompter interface
pkg/cmd/run/shared/shared.go:538
↓ 5 callers
Function
ShortRef
ShortRef strips the "refs/heads/" or "refs/tags/" prefix from a fully qualified ref, returning the short name. If the ref is not fully qualified it is
internal/skills/discovery/discovery.go:139
↓ 5 callers
Function
SigstoreBundle
SigstoreBundle returns a test sigstore-go bundle.Bundle
pkg/cmd/attestation/test/data/data.go:17
↓ 5 callers
Method
StandardSearchString
String returns the string representation of the query which can be used with the legacy search backend, which is used in global search GUI (i.e. githu
pkg/search/query.go:126
↓ 5 callers
Method
StartSSHServer
(ctx context.Context)
internal/codespaces/rpc/invoker.go:47
↓ 5 callers
Function
StringSliceEnumFlag
(cmd *cobra.Command, p *[]string, name, shorthand string, defaultValues, options []string, usage string)
pkg/cmdutil/flags.go:38
↓ 5 callers
Function
StubUpload
StubUpload registers one upload of name against repositoryID, answering with status and body. It matches on the query the upload carries, so a reques
internal/attachments/test.go:67
↓ 5 callers
Method
ToplevelDir
ToplevelDir returns the top-level directory path of the current repository.
git/client.go:727
↓ 5 callers
Method
UnqualifiedHeadRef
UnqualifiedHeadRef returns a head ref in the form of the branch name only.
pkg/cmd/pr/create/create.go:99
↓ 5 callers
Method
Unwrap
()
pkg/cmd/pr/shared/finder.go:620
↓ 5 callers
Method
UpdateAvailable
()
pkg/cmd/extension/extension.go:214
↓ 5 callers
Method
UpsertMeasures
(Measures)
internal/gh/ghtelemetry/telemetry.go:18
↓ 5 callers
Method
UsersForHost
UsersForHost retrieves a list of users configured for a specific host.
internal/gh/gh.go:299
↓ 5 callers
Method
ViewerCanPush
ViewerCanPush is true when the requesting user has push access
api/queries_repo.go:267
↓ 5 callers
Function
WithSampleRate
WithSampleRate allows setting a sample rate (0-100) for telemetry events. Rates 0 and 100 retain all events. Sampling is based on invocation ID, so an
internal/telemetry/telemetry.go:164
↓ 5 callers
Function
WorktreeForBranch
WorktreeForBranch returns the worktree that has branch checked out, or nil when the branch is not associated with any worktree.
git/objects.go:90
↓ 5 callers
Method
addf
(path, format string, args ...any)
script/ghmock/graphqlcheck.go:192
↓ 5 callers
Method
appendRun
(rec runRecord)
script/ghmock/store.go:215
↓ 5 callers
Function
compactJSON
(data []byte)
script/ghmock/report.go:546
↓ 5 callers
Function
decodeJSONBody
(req *http.Request, dest any)
pkg/httpmock/stub.go:116
↓ 5 callers
Function
dedent
(s string)
pkg/cmd/root/help.go:304
↓ 5 callers
Function
dedupe
dedupe drops repeated problems, keeping the first of each.
script/ghmock/checker.go:271
↓ 5 callers
Function
describeJSON
describeJSON names the kind of a decoded JSON value for messages.
script/ghmock/checker.go:241
↓ 5 callers
Function
editRun
(opts *EditOptions)
pkg/cmd/issue/edit/edit.go:291
↓ 5 callers
Function
extensionHTTPClient
(t *testing.T, path string, status int, body string)
pkg/cmd/extension/http_test.go:18
↓ 5 callers
Function
fixed
(context: Evidence)
evals/src/graders.test.ts:23
↓ 5 callers
Function
forbiddenError
forbiddenError tells a 403 response for an account without preview access apart from other denials. It keeps the HTTP error wrapped, so callers treat
pkg/cmd/event/client/client.go:246
↓ 5 callers
Method
getAsset
()
internal/attachments/userasset.go:47
↓ 5 callers
Method
getBundle
(url safeurl.SafeURL)
pkg/cmd/attestation/api/client.go:234
↓ 5 callers
Function
getSecrets
(client *http.Client, host string, u *safeurl.MutableSafeURL)
pkg/cmd/secret/list/list.go:318
↓ 5 callers
Method
gitFixtureDir
()
script/ghmock/gitfixture.go:51
↓ 5 callers
Function
gpgKeyUpload
(httpClient *http.Client, hostname string, keyFile io.Reader, title string)
pkg/cmd/gpg-key/add/http.go:18
↓ 5 callers
Method
hostname
()
pkg/cmd/status/status.go:202
↓ 5 callers
Function
issueResponseAllIssues2Fields
issueResponseAllIssues2Fields returns a GraphQL response for an issue with all Issues 2.0 fields populated.
pkg/cmd/issue/view/view_test.go:660
↓ 5 callers
Function
listRun
(opts *ListOptions)
pkg/cmd/repo/list/list.go:119
↓ 5 callers
Function
makeTestAttestation
()
pkg/cmd/attestation/api/mock_client.go:17
↓ 5 callers
Function
matchSkillConventions
matchSkillConventions checks if a blob path matches any known skill convention.
internal/skills/discovery/discovery.go:438
↓ 5 callers
Function
mergeRun
Run the merge command.
pkg/cmd/pr/merge/merge.go:600
↓ 5 callers
Function
newChecker
(progress io.Writer)
script/ghmock/checker.go:50
↓ 5 callers
Function
parseWithName
parseWithName parses flags for a command whose name argument normally comes first, which would otherwise stop flag parsing. It returns the name.
script/ghmock/set.go:110
↓ 5 callers
Function
printResultLine
printResultLine prints a piped result line. Every line has all five tab-separated columns, even empty ones, like gh pr checks rows.
pkg/cmd/issue/artifact/shared/results.go:100
↓ 5 callers
Function
refreshRun
(opts *RefreshOptions)
pkg/cmd/auth/refresh/refresh.go:147
↓ 5 callers
Function
removeRun
(opts *DeleteOptions)
pkg/cmd/secret/delete/delete.go:90
↓ 5 callers
Function
requireAPIHTTPError
(t *testing.T, err error, statusCode int)
pkg/cmd/release/create/http_test.go:164
↓ 5 callers
Method
revParse
(ctx context.Context, args ...string)
git/client.go:755
↓ 5 callers
Function
runAddItem
(config addItemConfig)
pkg/cmd/project/item-add/item_add.go:84
↓ 5 callers
Function
runCloneCommand
(httpClient *http.Client, cli string)
pkg/cmd/repo/clone/clone_test.go:114
↓ 5 callers
Function
runCommand
(rt http.RoundTripper, pm *prompter.MockPrompter, isTTY bool, cli string)
pkg/cmd/issue/delete/delete_test.go:28
↓ 5 callers
Function
runCommand
(rt http.RoundTripper, isTTY bool, cli string)
pkg/cmd/pr/ready/ready_test.go:91
↓ 5 callers
Function
runCopy
(config copyConfig)
pkg/cmd/project/copy/copy.go:88
↓ 5 callers
Function
runCreate
(config createConfig)
pkg/cmd/project/create/create.go:72
↓ 5 callers
Function
runCreateItem
(config createItemConfig)
pkg/cmd/project/item-create/item_create.go:85
↓ 5 callers
Function
runDelete
(config deleteConfig)
pkg/cmd/project/delete/delete.go:79
↓ 5 callers
Function
runDeleteItem
(config deleteItemConfig)
pkg/cmd/project/item-delete/item_delete.go:83
↓ 5 callers
Function
save
(path: string, value: unknown, secrets: string[] = [])
evals/src/core/io.ts:81
↓ 5 callers
Function
specialKey
(code rune, mod tea.KeyMod)
pkg/cmd/extension/browse/model_test.go:880
↓ 5 callers
Method
status
()
script/ghmock/store.go:46
↓ 5 callers
Function
stubExtensionUpdate
(updatePath string)
pkg/cmd/extension/manager_test.go:1607
↓ 5 callers
Method
subscriptions
Lists every active subscription of the caller, following pagination links.
evals/src/suites/events/github.ts:54
↓ 5 callers
Function
testAsset
testAsset stubs file opening so upload reads body without touching the filesystem.
internal/attachments/client_test.go:23
↓ 5 callers
Function
useTestSchemas
useTestSchemas points ghmock at the small schemas in testdata.
script/ghmock/run_test.go:63
↓ 5 callers
Function
validateName
validateName checks if a skill name is safe for use (filesystem-safe).
internal/skills/discovery/discovery.go:1089
↓ 5 callers
Function
validateRefreshableCredential
(credential gh.Credential)
internal/config/refreshable.go:616
↓ 5 callers
Function
verifyNotifyCodespaceOfClientActivity
Test that the RPC invoker notifies the codespace of client activity on connection
internal/codespaces/rpc/invoker_test.go:90
↓ 5 callers
Function
verifyRun
(config *VerifyConfig)
pkg/cmd/release/verify/verify.go:118
↓ 5 callers
Method
warnf
(format string, args ...any)
pkg/cmd/pr/merge/merge.go:554
↓ 5 callers
Function
wrapInternal
wrapInternal wraps an error with a prefix as an Internal error. The original error cause is accessible by github.com/pkg/errors.Cause.
internal/barista/observability/telemetry.twirp.go:831
↓ 5 callers
Method
writeError
writeError writes an HTTP response with a valid Twirp error format, and triggers hooks. If err is not a twirp.Error, it will get wrapped with twirp.In
internal/barista/observability/telemetry.twirp.go:266
↓ 5 callers
Function
writeFiles
writeFiles puts real files in a temporary working directory, because uploading opens the path it is given. A name may include directories, which are c
internal/attachments/attach_test.go:20
↓ 4 callers
Function
AccessControlEntriesToVisibility
AccessControlEntriesToVisibility converts the access control entries used by Dev Tunnels to a friendly visibility value.
internal/codespaces/portforwarder/port_forwarder.go:357
↓ 4 callers
Method
ActiveToken
ActiveToken retrieves the active credential for the given hostname, searching environment variables, plain text config, and lastly encrypted storage.
internal/config/config.go:316
↓ 4 callers
Method
ActiveTokenWithRefresh
(string)
pkg/cmd/auth/gitcredential/helper.go:19
↓ 4 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 environme
internal/config/config.go:423
↓ 4 callers
Method
All
All returns a map of all aliases to their corresponding expansions.
internal/gh/gh.go:345
↓ 4 callers
Function
AuthTokenWriteable
(authCfg gh.AuthConfig, hostname string)
pkg/cmd/auth/shared/writeable.go:18
↓ 4 callers
Method
AuthorLogin
()
pkg/cmd/pr/shared/comments.go:17
↓ 4 callers
Method
Boldf
(t string, args ...any)
pkg/iostreams/color.go:67
↓ 4 callers
Function
BuildAliasList
(cmd *cobra.Command, aliases []string)
pkg/cmd/root/help.go:330
↓ 4 callers
Function
BuildRepoURL
BuildRepoURL returns the canonical repository URL stored in skill metadata.
internal/skills/source/source.go:15
↓ 4 callers
Function
CheckType
CheckType refuses an artifact whose type this version of gh doesn't know. A new type can need handling gh doesn't have, so commands whose behavior dep
pkg/cmd/issue/artifact/shared/shared.go:282
↓ 4 callers
Method
CheckoutNewBranch
(ctx context.Context, remoteName, branch string)
git/client.go:691
↓ 4 callers
Method
Choose
()
pkg/cmd/pr/shared/templates.go:184
↓ 4 callers
Method
Code
(Query)
pkg/search/searcher.go:30
↓ 4 callers
Method
Config
(ctx context.Context, name string)
git/client.go:322
↓ 4 callers
Method
CurrentUserComments
()
pkg/cmd/pr/shared/commentable.go:37
↓ 4 callers
Function
Default
Default returns the host name of the default GitHub instance.
internal/ghinstance/host.go:21
↓ 4 callers
Method
Delete
Delete deletes one artifact from an issue. The API can't restore a deleted artifact.
pkg/cmd/issue/artifact/client/client.go:38
↓ 4 callers
Method
DeleteLocalBranch
(ctx context.Context, branch string)
git/client.go:665
↓ 4 callers
Method
DetailedItems
()
pkg/cmd/project/shared/queries/queries.go:261
↓ 4 callers
Method
DetectConfiguredHelper
DetectConfiguredHelper reads the git credential helper configured for hostname and returns its category ("ours", "other", or "none"), or "error" when
pkg/cmd/auth/shared/git_credential.go:143
← previous
next →
601–700 of 7,487, ranked by callers