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
↓ 3 callers
Function
NewCmdComment
(f *cmdutil.Factory, telemetry ghtelemetry.InvocationRecorder, runF func(*prShared.CommentableOptions) error)
pkg/cmd/issue/comment/comment.go:15
↓ 3 callers
Function
NewCmdInstall
NewCmdInstall creates the "skills install" command.
pkg/cmd/skills/install/install.go:76
↓ 3 callers
Function
NewCopilotReviewerReplacer
NewCopilotReviewerReplacer creates a replacer for reviewer @copilot references.
pkg/cmd/pr/shared/params.go:347
↓ 3 callers
Function
NewLiveStore
(outputPath string)
pkg/cmd/attestation/download/metadata.go:88
↓ 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:197
↓ 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
NewUploader
NewUploader returns the uploader for a command's --attach files, which upload against the issue's repository with the token for its host. It refuses a
pkg/cmd/issue/artifact/shared/shared.go:262
↓ 3 callers
Function
NewVerifyCmd
(f *cmdutil.Factory, runF func(*Options) error)
pkg/cmd/attestation/verify/verify.go:23
↓ 3 callers
Function
NilStringFlag
NilStringFlag defines a new flag with a string pointer receiver. This is useful for differentiating between the flag being set to a blank value and th
pkg/cmdutil/flags.go:15
↓ 3 callers
Method
Nodes
()
pkg/cmd/project/shared/queries/queries.go:757
↓ 3 callers
Method
OpenStream
OpenStream opens the server-sent events stream of the subscription with the given ID. The caller must close the returned body. The stream is live only
pkg/cmd/event/client/client.go:57
↓ 3 callers
Function
OverrideBaseRepoFunc
(baseRepoFunc func() (ghrepo.Interface, error), override string)
pkg/cmdutil/repo_override.go:75
↓ 3 callers
Function
ParseArtifactArg
ParseArtifactArg is ParseArtifactArgs for a command that takes one artifact, {<issue> <artifact-number> | <artifact-url>}. A second artifact URL is al
pkg/cmd/issue/artifact/shared/shared.go:113
↓ 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
ParsePushDefault
(s string)
git/client.go:512
↓ 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:85
↓ 3 callers
Method
PathFromRoot
Show current directory relative to the top-level directory of repository.
git/client.go:744
↓ 3 callers
Function
PrCheckStatusSummaryWithColor
(cs *iostreams.ColorScheme, checks api.PullRequestChecksStatus)
pkg/cmd/pr/shared/display.go:85
↓ 3 callers
Function
PrintPartialFailure
PrintPartialFailure prints the line for an artifact the command acted on while another part of its work failed, such as an artifact saved with only so
pkg/cmd/issue/artifact/shared/results.go:89
↓ 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:1545
↓ 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:61
↓ 3 callers
Method
PullRequestFeatures
()
internal/featuredetection/feature_detection.go:17
↓ 3 callers
Method
PushRevision
(ctx context.Context, branchName string)
pkg/cmd/pr/shared/finder.go:42
↓ 3 callers
Function
RESTPrefix
(hostname string)
internal/ghinstance/host.go:59
↓ 3 callers
Function
RangeArgs
RangeArgs is cobra.RangeArgs with the usage errors ExactArgs gives: more than max arguments is "too many arguments", and fewer than min is msg, so the
pkg/cmdutil/args.go:42
↓ 3 callers
Function
ReadContent
ReadContent reads an artifact's new content from the file at path, following a symlink, or from stdin when path is "-". It also returns the directory
pkg/cmd/issue/artifact/shared/content.go:24
↓ 3 callers
Method
ReadUserFile
(fn string)
pkg/iostreams/iostreams.go:445
↓ 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
RecordExpiringSetupCancelled
RecordExpiringSetupCancelled records whether the user cancelled the sign-in at the expiring credential-helper prompt. That prompt, and therefore a can
pkg/cmd/auth/shared/telemetry.go:41
↓ 3 callers
Method
RefreshCalls
RefreshCalls gets all the calls that were made to Refresh. Check the length with: len(mockedTokenRefresher.RefreshCalls())
internal/gh/mock/token_refresher.go:70
↓ 3 callers
Method
Register
Register a stub for an external command. Pattern is a regular expression, output is the standard output from a command. Pass callbacks to inspect raw
internal/run/stub.go:74
↓ 3 callers
Method
RejectExisting
RejectExisting removes any credentials cached for the given hostname by the configured git credential helper.
pkg/cmd/auth/shared/gitcredentials/updater.go:17
↓ 3 callers
Method
RemoteForRepo
RemoteForRepo finds the git remote that points to a repository
context/context.go:165
↓ 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:619
↓ 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:1753
↓ 3 callers
Function
RepoIssueTypes
RepoIssueTypes fetches the available issue types for a repository.
api/queries_issue.go:748
↓ 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:1721
↓ 3 callers
Function
RepoNetwork
RepoNetwork inspects the relationship between multiple GitHub repositories
api/queries_repo.go:477
↓ 3 callers
Method
RepositoryFeatures
()
internal/featuredetection/feature_detection.go:18
↓ 3 callers
Function
RepositoryGraphQL
(fields []string)
api/query_builder.go:555
↓ 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:54
↓ 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
Function
ResolveWorktreeTarget
ResolveWorktreeTarget validates path and determines whether it is the root of an existing linked worktree for the current repository.
pkg/cmd/pr/shared/worktree.go:24
↓ 3 callers
Method
ResultingHelperCategory
ResultingHelperCategory reports the git credential helper in effect after Setup ran, as one of "ours", "other", or "none", or "error" when helper dete
pkg/cmd/auth/shared/git_credential.go:154
↓ 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:443
↓ 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:475
↓ 3 callers
Method
SetRemoteBranches
(ctx context.Context, remote string, refspec string)
git/client.go:830
↓ 3 callers
Function
ShortSHA
ShortSHA returns the first 8 characters of a SHA hash for display purposes.
git/client.go:810
↓ 3 callers
Function
ShortcutURL
ShortcutURL returns the URL an Internet Shortcut file's content links to, read the way Windows reads it: the first URL= in the [InternetShortcut] sect
pkg/cmd/issue/artifact/shared/content.go:70
↓ 3 callers
Function
ShouldCopyToClipboard
ShouldCopyToClipboard resolves an explicit flag value before falling back to configuration.
pkg/cmd/auth/shared/login_flow.go:64
↓ 3 callers
Method
ShowRefs
ShowRefs resolves fully-qualified refs to commit hashes.
git/client.go:237
↓ 3 callers
Function
SplitFileArg
SplitFileArg splits an argument of the form <file>#<text>, the way --attach reads '<file>#<image alt text>'. An existing path wins over the delimiter,
internal/attachments/flags.go:105
↓ 3 callers
Method
StartAlternateScreenBuffer
()
pkg/iostreams/iostreams.go:381
↓ 3 callers
Method
StartJupyterServer
(ctx context.Context)
internal/codespaces/rpc/invoker.go:45
↓ 3 callers
Function
StatusScopesResponder
StatusScopesResponder returns a response with the given status code and OAuth scopes.
pkg/httpmock/stub.go:257
↓ 3 callers
Method
String
()
test/helpers.go:15
↓ 3 callers
Method
StubIssueRepoInfoResponse
(owner, repo string)
pkg/httpmock/legacy.go:32
↓ 3 callers
Method
Telemetry
Telemetry returns the configured telemetry setting, ignoring host scoping since telemetry is a global setting.
internal/gh/gh.go:69
↓ 3 callers
Method
Test
(t *testing.T)
pkg/cmd/auth/shared/contract/helper_config.go:20
↓ 3 callers
Method
Theme
()
pkg/iostreams/iostreams.go:48
↓ 3 callers
Method
TokenForUserWithRefresh
TokenForUserWithRefresh retrieves the credential for a specified user and hostname and, when it is refreshable and its access token is expiring, renew
internal/gh/gh.go:304
↓ 3 callers
Method
TokenFromKeyringForUser
TokenFromKeyringForUser will retrieve the auth token for the given hostname and username, only searching in encrypted storage. An empty username will
internal/gh/gh.go:258
↓ 3 callers
Function
TryDetermineDefaultPRHead
TryDetermineDefaultPRHead is a thin wrapper around determineDefaultPushTarget, which attempts to convert a present remote into a resolved repository.
pkg/cmd/pr/shared/find_refs_resolution.go:185
↓ 3 callers
Method
UnmarshalJSON
UnmarshalJSON lets a struct field typed as Untrusted be populated directly by json.Unmarshal, so provenance is preserved across a JSON decode. This is
pkg/iostreams/untrusted.go:63
↓ 3 callers
Method
UnsetRemoteResolution
(ctx context.Context, name string)
git/client.go:817
↓ 3 callers
Method
Unwrap
Unwrap returns the underlying value of a [Some] variant, or panics if called on a [None] variant.
pkg/option/option.go:71
↓ 3 callers
Method
UnwrapOrElse
UnwrapOrElse returns the underlying value of a [Some] variant, or the result of calling the provided function on a [None] variant.
pkg/option/option.go:91
↓ 3 callers
Method
Update
Update saves a new version of one artifact on an issue and returns the artifact. A nil name or body keeps the current one. The API can't change an art
pkg/cmd/issue/artifact/client/client.go:45
↓ 3 callers
Method
UpdateAvailable
()
pkg/extensions/extension.go:25
↓ 3 callers
Method
UpdateRemoteURL
(ctx context.Context, name, url string)
git/client.go:189
↓ 3 callers
Method
UploadAndAttachDocuments
UploadAndAttachDocuments attaches one set of files to several documents at once. It uploads each file once, in order, and stops at the first failure.
internal/attachments/attach.go:117
↓ 3 callers
Function
UserKeys
(httpClient *http.Client, host, userHandle string)
pkg/cmd/ssh-key/shared/user_keys.go:24
↓ 3 callers
Method
VSCode
VSCode opens a codespace in the local VS VSCode application.
pkg/cmd/codespace/code.go:36
↓ 3 callers
Function
ValidateChild
ValidateChild reports whether the cleaned name is a lexically contained path, using the host operating system's path rules. Joining it to a root stays
internal/safepaths/root.go:278
↓ 3 callers
Method
WaitForOutput
(s string)
pkg/surveyext/editor_test.go:225
↓ 3 callers
Method
WithMeta
(key string, val string)
internal/barista/observability/telemetry.twirp.go:888
↓ 3 callers
Function
WithPrAndIssueQueryParams
(client *api.Client, baseRepo ghrepo.Interface, baseURL string, state IssueMetadataState, projectsV1Support gh
pkg/cmd/pr/shared/params.go:16
↓ 3 callers
Method
WithTheme
(theme huh.Theme)
internal/prompter/multi_select_with_search.go:422
↓ 3 callers
Function
WithoutFollowingRedirects
WithoutFollowingRedirects stops the request from following redirects. When a redirect is encountered, the request fails with an HTTPError carrying the
api/client.go:83
↓ 3 callers
Function
WriteHelp
WriteHelp renders the full help text for command to w. This is the same output produced by `gh <command> --help`, exposed separately so that callers s
pkg/cmd/root/help.go:125
↓ 3 callers
Function
addDeprecatedRepoShorthand
addDeprecatedRepoShorthand adds a -r parameter (deprecated shorthand for --repo) which instructs the user to use -R instead.
pkg/cmd/codespace/common.go:237
← previous
next →
1,001–1,100 of 7,487, ranked by callers