Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cli/cli
/ functions
Functions
5,909 in github.com/cli/cli
⨍
Functions
5,909
◇
Types & classes
1,299
↓ 3 callers
Method
Export
Export returns the reaction group as a map for JSON output.
pkg/cmd/discussion/client/types.go:265
↓ 3 callers
Method
ExportData
(_ []string)
pkg/cmd/project/shared/queries/queries.go:673
↓ 3 callers
Method
ExportData
(_ []string)
pkg/cmd/project/shared/queries/queries.go:1047
↓ 3 callers
Function
FetchRefSHA
(ctx context.Context, httpClient *http.Client, repo ghrepo.Interface, tagName string)
pkg/cmd/release/shared/fetch.go:140
↓ 3 callers
Function
FetchRepoVisibility
FetchRepoVisibility returns the repository visibility: "public", "private", or "internal".
internal/skills/discovery/discovery.go:191
↓ 3 callers
Method
Filter
(text string)
pkg/cmd/extension/browse/browse.go:289
↓ 3 callers
Function
FindWorkflow
FindWorkflow looks up a workflow either by numeric database ID, file name, or its Name field
pkg/cmd/workflow/shared/shared.go:131
↓ 3 callers
Method
Follow
(fetcher func() ([]byte, error), w io.Writer, io *iostreams.IOStreams)
pkg/cmd/agent-task/shared/log.go:19
↓ 3 callers
Function
ForkRepo
ForkRepo forks the repository on GitHub and returns the new repository
api/queries_repo.go:592
↓ 3 callers
Function
FormatSize
FormatSize formats a byte count using binary units (B, KB, MB, GB, TB, PB). Values below a kilobyte are shown as whole bytes; larger values are shown
internal/text/text.go:156
↓ 3 callers
Method
ForwardPort
(ctx context.Context, opts ForwardPortOpts)
internal/codespaces/portforwarder/port_forwarder.go:45
↓ 3 callers
Function
FuzzyAgoAbbr
FuzzyAgoAbbr is an abbreviated version of FuzzyAgo. It returns a human readable string of the time duration between a and b that is estimated to the n
internal/text/text.go:52
↓ 3 callers
Function
GetAnnotations
GetAnnotations fetches annotations from the REST API. If the job has no annotations, an empty slice is returned. If the API returns a 403, a custom E
pkg/cmd/run/shared/shared.go:282
↓ 3 callers
Function
GetCaches
Return a list of caches for a repository. Pass a negative limit to request all pages from the API until all caches have been fetched.
pkg/cmd/cache/shared/shared.go:48
↓ 3 callers
Method
GetCodespace
GetCodespace returns the user codespace based on the provided name. If the codespace is not found, an error is returned. If includeConnection is true,
internal/codespaces/api/api.go:539
↓ 3 callers
Function
GetRawGistFile
GetRawGistFile fetches the full content of a gist file from its raw URL. The bytes are external content, so they are returned as iostreams.Untrusted t
pkg/cmd/gist/shared/shared.go:258
↓ 3 callers
Function
GetRepoIDs
MapReposToIDs retrieves a set of IDs for the given set of repositories. This is similar logic to RepoNetwork, but only fetches databaseId and does not
api/queries_repo.go:1640
↓ 3 callers
Function
GetRuns
(client *api.Client, repo ghrepo.Interface, opts *FilterOptions, limit int)
pkg/cmd/run/shared/shared.go:368
↓ 3 callers
Function
GetRunsWithFilter
GetRunsWithFilter fetches 50 runs from the API and filters them in-memory
pkg/cmd/run/shared/shared.go:349
↓ 3 callers
Function
GetScopes
GetScopes performs a GitHub API request and returns the value of the X-Oauth-Scopes header.
pkg/cmd/auth/shared/oauth_scopes.go:36
↓ 3 callers
Method
GetTrustDomain
GetTrustDomain returns the current trust domain. If the default is used the empty string is returned
pkg/cmd/attestation/api/client.go:295
↓ 3 callers
Function
GistHost
(hostname string)
internal/ghinstance/host.go:80
↓ 3 callers
Function
GlobPaths
GlobPaths expands a list of file patterns into a list of file paths. If no files match a pattern, that pattern will return an error. If no pattern is
pkg/cmdutil/args.go:85
↓ 3 callers
Function
GraphQLEndpoint
(hostname string)
internal/ghinstance/host.go:46
↓ 3 callers
Function
GroupedCommands
(cmd *cobra.Command)
pkg/cmd/root/help.go:245
↓ 3 callers
Method
HasActiveToken
HasActiveToken returns true when a token for the hostname is present.
internal/gh/gh.go:107
↓ 3 callers
Function
HasHiddenDirSkills
HasHiddenDirSkills returns true if any of the given skills were discovered in hidden directories.
internal/skills/discovery/discovery.go:96
↓ 3 callers
Function
HasMinimumScopes
HasMinimumScopes performs a GitHub API request and returns an error if the token used in the request lacks the minimum required scopes for performing
pkg/cmd/auth/shared/oauth_scopes.go:70
↓ 3 callers
Method
HasTemplates
()
pkg/cmd/pr/shared/templates.go:170
↓ 3 callers
Function
HeaderHasMinimumScopes
HeaderHasMinimumScopes parses the comma separated scopesHeader string and returns an error if it lacks the minimum required scopes for performing API
pkg/cmd/auth/shared/oauth_scopes.go:81
↓ 3 callers
Method
Identifier
()
pkg/cmd/pr/shared/commentable.go:33
↓ 3 callers
Function
IndexesFor
(options []string, answers ...string)
internal/prompter/test.go:159
↓ 3 callers
Method
Input
Input prompts the user to enter a string value.
internal/prompter/prompter.go:34
↓ 3 callers
Method
InstallLocal
(dir string)
pkg/extensions/extension.go:35
↓ 3 callers
Method
IsLocal
()
pkg/extensions/extension.go:27
↓ 3 callers
Method
IsOpen
()
api/queries_pr.go:321
↓ 3 callers
Method
IsPinned
()
pkg/extensions/extension.go:24
↓ 3 callers
Function
IsSkillPath
IsSkillPath reports whether a skill selector looks like a repo-relative path rather than a simple skill name.
internal/skills/discovery/discovery.go:417
↓ 3 callers
Function
IsSpecCompliant
IsSpecCompliant checks if a skill name matches the strict agentskills.io spec.
internal/skills/discovery/discovery.go:1120
↓ 3 callers
Method
LabelsToIDs
(names []string)
api/queries_repo.go:806
↓ 3 callers
Method
LastCommit
()
pkg/cmd/browse/browse.go:359
↓ 3 callers
Method
LegacyBody
()
pkg/cmd/pr/shared/templates.go:177
↓ 3 callers
Method
ListLabels
ListLabels returns the labels available in a repository.
pkg/cmd/discussion/client/client.go:39
↓ 3 callers
Method
LocalPublicKeys
()
pkg/ssh/ssh_keys.go:37
↓ 3 callers
Function
Login
(opts *LoginOptions)
pkg/cmd/auth/shared/login_flow.go:50
↓ 3 callers
Method
Login
()
api/queries_repo.go:1164
↓ 3 callers
Function
MatchCategory
MatchCategory finds a category by name or slug (case-insensitive). It prefers an exact slug match over a name match, so users are encouraged to use sl
pkg/cmd/discussion/shared/categories.go:14
↓ 3 callers
Method
MilestoneToID
(title string)
api/queries_repo.go:939
↓ 3 callers
Function
MockInitWithError
(err error)
internal/keyring/keyring.go:80
↓ 3 callers
Method
MultiSelect
(string, []string, []string)
pkg/cmd/run/download/download.go:36
↓ 3 callers
Method
MultiSelect
MultiSelect prompts the user to select one or more options from a list of options.
internal/prompter/prompter.go:23
↓ 3 callers
Method
MultiSelectWithSearch
(prompt, searchPrompt string, defaults []string, persistentOptions []string, searchFunc func(string) prompter.
pkg/cmd/pr/shared/survey.go:44
↓ 3 callers
Method
NameForSubmit
()
pkg/cmd/pr/shared/templates.go:119
↓ 3 callers
Function
NewContextForTests
NewContextForTests creates a new `ssh.Context` with internal properties set to the specified values. It should only be used to inject test-specific se
pkg/ssh/ssh_keys.go:23
↓ 3 callers
Function
NewCopilotReviewerReplacer
NewCopilotReviewerReplacer creates a replacer for reviewer @copilot references.
pkg/cmd/pr/shared/params.go:347
↓ 3 callers
Function
NewMockVerifier
(mockResult *verification.AttestationProcessingResult)
pkg/cmd/release/shared/attestation.go:120
↓ 3 callers
Function
NewPullRequestFindRefsResolver
(gitConfigClient GitConfigClient, remotesFn func() (ghContext.Remotes, error))
pkg/cmd/pr/shared/find_refs_resolution.go:125
↓ 3 callers
Function
NewRemoteToRepoResolver
(remotesFn func() (ghContext.Remotes, error))
pkg/cmd/pr/shared/find_refs_resolution.go:248
↓ 3 callers
Function
NewSpecialAssigneeReplacer
NewSpecialAssigneeReplacer creates a replacer that expands @me and (when actorAssignees is true) Copilot actor names in assignee slices. copilotUseLog
pkg/cmd/pr/shared/editable.go:196
↓ 3 callers
Function
NewTrustedRootCmd
(f *cmdutil.Factory, runF func(*Options) error)
pkg/cmd/attestation/trustedroot/trustedroot.go:33
↓ 3 callers
Function
NewUntrustedBytes
NewUntrustedBytes labels a byte slice as untrusted external content.
pkg/iostreams/untrusted.go:31
↓ 3 callers
Function
NewVerifyCmd
(f *cmdutil.Factory, runF func(*Options) error)
pkg/cmd/attestation/verify/verify.go:23
↓ 3 callers
Method
Nodes
()
pkg/cmd/project/shared/queries/queries.go:760
↓ 3 callers
Function
OverrideBaseRepoFunc
(baseRepoFunc func() (ghrepo.Interface, error), override string)
pkg/cmdutil/repo_override.go:75
↓ 3 callers
Function
ParseDiscussionOrCommentArg
ParseDiscussionOrCommentArg parses a positional argument that can be a discussion number, discussion URL, comment node ID (DC_...), or comment URL (wi
pkg/cmd/discussion/shared/lookup.go:67
↓ 3 callers
Function
ParseMetadataRepo
ParseMetadataRepo extracts repository information from skill metadata.
internal/skills/source/source.go:35
↓ 3 callers
Function
ParseRemoteTrackingRef
ParseRemoteTrackingRef parses a string of the form "refs/remotes/<remote>/<branch>" into a RemoteTrackingBranch struct. If the string does not match t
git/client.go:556
↓ 3 callers
Function
ParseRepoURL
ParseRepoURL parses a repository URL stored in skill metadata.
internal/skills/source/source.go:20
↓ 3 callers
Function
ParseSSHArgs
ParseSSHArgs parses the given array of arguments into two distinct slices of flags and command. The ssh command syntax is: ssh [flags] user@host comma
internal/codespaces/ssh.go:100
↓ 3 callers
Function
ParseURL
ParseURL parses a pull request URL and returns the repository, pull request number, and any tailing path components. If there is no error, the returne
pkg/cmd/pr/shared/finder.go:306
↓ 3 callers
Function
Partition
Partition takes a slice of any type T and separates it into two slices of the same type based on the provided predicate function. Any item that return
pkg/cmdutil/args.go:67
↓ 3 callers
Function
PrCheckStatusSummaryWithColor
(cs *iostreams.ColorScheme, checks api.PullRequestChecksStatus)
pkg/cmd/pr/shared/display.go:85
↓ 3 callers
Method
Projects
Projects returns all the projects for an Owner. If the OwnerType is VIEWER, no login is required. If limit is 0, the default limit is used.
pkg/cmd/project/shared/queries/queries.go:1552
↓ 3 callers
Method
Prompt
EXTENDED This is straight copypasta from survey to get our overridden prompt called.;
pkg/surveyext/editor.go:154
↓ 3 callers
Method
Prompt
Prompt returns the configured prompt, optionally scoped by host.
internal/gh/gh.go:55
↓ 3 callers
Method
PullRequestFeatures
()
internal/featuredetection/feature_detection.go:17
↓ 3 callers
Method
ReadUserFile
(fn string)
pkg/iostreams/iostreams.go:444
↓ 3 callers
Method
RecordEvents
RecordEvents records a batch of telemetry events from a client application.
internal/barista/observability/telemetry.twirp.go:38
↓ 3 callers
Method
RemoteForRepo
RemoteForRepo finds the git remote that points to a repository
context/context.go:165
↓ 3 callers
Method
RemoteURL
RemoteURL returns the fetch URL configured for the named remote.
git/client.go:717
↓ 3 callers
Function
RenderJobs
(cs *iostreams.ColorScheme, jobs []Job, verbose bool)
pkg/cmd/run/shared/presentation.go:28
↓ 3 callers
Function
ReplaceActorsForAssignableByLogin
ReplaceActorsForAssignableByLogin calls the replaceActorsForAssignable mutation using actor logins. This avoids the need to resolve logins to node IDs
api/queries_pr.go:594
↓ 3 callers
Function
RepoGitIgnoreTemplate
RepoGitIgnoreTemplate fetches an available repository gitignore template. It uses API v3 here because gitignore template isn't supported by GraphQL.
api/queries_repo.go:1746
↓ 3 callers
Function
RepoIssueTypes
RepoIssueTypes fetches the available issue types for a repository.
api/queries_issue.go:727
↓ 3 callers
Function
RepoLicense
RepoLicense fetches an available repository license. It uses API v3 because licenses are not supported by GraphQL.
api/queries_repo.go:1714
↓ 3 callers
Method
RepositoryFeatures
()
internal/featuredetection/feature_detection.go:18
↓ 3 callers
Function
RepositoryGraphQL
(fields []string)
api/query_builder.go:552
↓ 3 callers
Function
RequestableReviewersForCompletion
(httpClient *http.Client, repo ghrepo.Interface)
pkg/cmd/pr/shared/completion.go:14
↓ 3 callers
Method
ResetOutput
()
pkg/surveyext/editor_test.go:238
↓ 3 callers
Method
ResolveCommentNodeID
ResolveCommentNodeID constructs a discussion comment node ID from a repository and a comment database ID (the numeric ID from the URL fragment).
pkg/cmd/discussion/client/client.go:57
↓ 3 callers
Function
ResolveFieldByName
ResolveFieldByName finds the single project field whose name matches name, case-insensitively. Matching is case-insensitive to mirror the Projects v2
pkg/cmd/project/shared/queries/resolve_fields.go:65
↓ 3 callers
Function
ResolveLabels
ResolveLabels matches user-provided label names (case-insensitive) against a set of known labels and returns the corresponding IDs. If any names canno
pkg/cmd/discussion/shared/labels.go:13
↓ 3 callers
Method
ResolvePullRequestRefs
ResolvePullRequestRefs takes a base repository, a base branch name and a local branch name and uses the git configuration to determine the head reposi
pkg/cmd/pr/shared/find_refs_resolution.go:135
↓ 3 callers
Method
SSH
SSH opens an ssh session or runs an ssh command in a codespace.
pkg/cmd/codespace/ssh.go:165
↓ 3 callers
Function
SSHKeyUpload
Uploads the provided SSH key. Returns true if the key was uploaded, false if it was not.
pkg/cmd/ssh-key/add/http.go:17
↓ 3 callers
Function
ScopeLabels
ScopeLabels returns the display labels for the scope selection prompt. If repoName is non-empty, it is included in the project-scope label for additio
internal/skills/registry/registry.go:435
↓ 3 callers
Function
SearchIssues
(opts *IssuesOptions)
pkg/cmd/search/shared/shared.go:58
↓ 3 callers
Method
Select
generic prompts from go-gh Select prompts the user to select an option from a list of options.
internal/prompter/prompter.go:21
↓ 3 callers
Method
SendKey
(c rune)
pkg/surveyext/editor_test.go:220
↓ 3 callers
Method
SetAccessiblePrompterEnabled
(enabled bool)
pkg/iostreams/iostreams.go:474
← previous
next →
701–800 of 5,909, ranked by callers