MCPcopy Create free account

hub / github.com/cli/cli / functions

Functions6,141 in github.com/cli/cli

↓ 1,182 callersMethodEqual
(s2 *stringSet)
pkg/set/string_set.go:72
↓ 885 callersMethodRun
()
internal/run/run.go:19
↓ 831 callersMethodString
()
internal/safeurl/safeurl.go:33
↓ 609 callersFunctionTest
()
pkg/iostreams/iostreams.go:585
↓ 589 callersMethodErrorf
(string, ...any)
pkg/httpmock/registry.go:56
↓ 550 callersMethodRegister
(m Matcher, resp Responder)
pkg/httpmock/registry.go:24
↓ 431 callersMethodVerify
(t Testing)
pkg/httpmock/registry.go:60
↓ 350 callersMethodJoin
Join an absolute path with elements to create a new Absolute path, or error. A PathTraversalError will be returned if the joined path would traverse o
internal/safepaths/absolute.go:38
↓ 319 callersMethodSetStdoutTTY
(isTTY bool)
pkg/iostreams/iostreams.go:176
↓ 298 callersFunctionGraphQL
(q string)
pkg/httpmock/stub.go:44
↓ 279 callersMethodContains
(value string)
pkg/set/string_set.go:59
↓ 258 callersMethodRepoHost
()
internal/ghrepo/repo.go:17
↓ 251 callersFunctionStringResponse
(body string)
pkg/httpmock/stub.go:124
↓ 238 callersFunctionNewClientFromHTTP
(httpClient *http.Client)
api/client.go:30
↓ 234 callersFunctionREST
REST returns a matcher to a request for the HTTP method and URL escaped path p. For example, to match a GET request to `/api/v3/repos/octocat/hello-wo
pkg/httpmock/stub.go:35
↓ 228 callersFunctionNew
New instantiates a GitHub repository from owner and name arguments
internal/ghrepo/repo.go:21
↓ 214 callersMethodSetStdinTTY
(isTTY bool)
pkg/iostreams/iostreams.go:161
↓ 204 callersMethodRepoOwner
()
internal/ghrepo/repo.go:16
↓ 197 callersMethodErrorf
(string, ...any)
internal/run/stub.go:17
↓ 195 callersMethodClose
()
internal/codespaces/rpc/invoker.go:44
↓ 191 callersMethodRepoName
()
internal/ghrepo/repo.go:15
↓ 182 callersMethodColorScheme
()
pkg/iostreams/iostreams.go:433
↓ 158 callersFunctionStatusStringResponse
(status int, body string)
pkg/httpmock/stub.go:156
↓ 149 callersFunctionJoinPath
JoinPath returns a SafeURL for the path made up of the given components. It returns an error if any component is exactly "..", which would traverse th
internal/safeurl/safeurl.go:54
↓ 147 callersMethodSetStderrTTY
(isTTY bool)
pkg/iostreams/iostreams.go:193
↓ 144 callersMethodIsStdoutTTY
()
pkg/iostreams/iostreams.go:181
↓ 131 callersFunctionFlagErrorf
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
pkg/cmdutil/errors.go:12
↓ 124 callersFunctionNewTestClient
(opts ...TestClientOpt)
pkg/cmd/project/shared/queries/queries.go:41
↓ 121 callersMethodReply
Reply method for sshRequest to satisfy the tunnelssh.SSHRequest interface
internal/codespaces/connection/tunnels_api_server_mock.go:373
↓ 121 callersFunctionStub
Stub installs a catch-all for all external commands invoked from gh. It returns a restore func that, when invoked from tests, fails the current test i
internal/run/stub.go:22
↓ 120 callersMethodError
()
pkg/cmd/root/root.go:60
↓ 118 callersFunctionNewMockConfig
NewMockConfig returns a mock config populated with gh's default config file. See NewMockConfigFromString for when to prefer a mock over NewIsolatedTes
internal/config/test.go:18
↓ 116 callersFunctionFromFullName
FromFullName extracts the GitHub repository information from the following formats: "OWNER/REPO", "HOST/OWNER/REPO", and a full URL.
internal/ghrepo/repo.go:46
↓ 113 callersMethodBaseRepo
While the only thing really required from an api.Repository is the repository ID, changing that would require changing the API function signatures, an
pkg/cmd/pr/create/create.go:100
↓ 110 callersFunctionFullName
FullName serializes a GitHub repository into an "OWNER/REPO" string
internal/ghrepo/repo.go:35
↓ 110 callersMethodREST
(hostname, method, p string, body io.Reader, data any)
pkg/cmd/attestation/api/client.go:57
↓ 106 callersMethodWrite
(io *iostreams.IOStreams, data any)
pkg/cmdutil/json_flags.go:200
↓ 102 callersMethodStderr
()
test/helpers.go:19
↓ 95 callersMethodCanPrompt
()
pkg/iostreams/iostreams.go:275
↓ 91 callersFunctionGraphQLMutation
(body string, cb func(map[string]any))
pkg/httpmock/stub.go:217
↓ 91 callersMethodLen
()
pkg/cmd/status/status.go:168
↓ 88 callersMethodAuthentication
Authentication provides persistent storage and modification of authentication configuration.
internal/gh/gh.go:67
↓ 85 callersMethodQuery
(queryName string, query any, variables map[string]any)
pkg/cmd/project/shared/queries/queries.go:77
↓ 84 callersMethodConfig
(name string)
pkg/cmd/extension/git.go:13
↓ 82 callersFunctionStubFinderForRunCommandStyleTests
StubFinderForRunCommandStyleTests is the NewMockFinder substitute to be used ONLY in runCommand-style tests.
pkg/cmd/pr/shared/finder.go:78
↓ 77 callersMethodSet
Set provides primitive access for setting configuration values, optionally scoped by host.
internal/gh/gh.go:36
↓ 75 callersFunctionJSONResponse
(body any)
pkg/httpmock/stub.go:162
↓ 71 callersMethodStopProgressIndicator
()
internal/codespaces/codespaces.go:47
↓ 70 callersMethodBold
(t string)
pkg/iostreams/color.go:60
↓ 69 callersMethodVerify
(attestations []*api.Attestation, policy verify.PolicyBuilder)
pkg/cmd/attestation/verification/sigstore.go:45
↓ 68 callersMethodCommand
(ctx context.Context, args ...string)
git/client.go:77
↓ 67 callersMethodDefaultHost
()
pkg/cmd/status/status.go:31
↓ 64 callersMethodID
()
api/queries_repo.go:1166
↓ 58 callersMethodError
()
pkg/cmd/auth/shared/oauth_scopes.go:17
↓ 58 callersMethodMutate
(queryName string, query any, variables map[string]any)
pkg/cmd/project/shared/queries/queries.go:78
↓ 58 callersFunctionnewTestAuthConfig
Note that NewIsolatedTestConfig sets up a Mock keyring as well
internal/config/auth_config_test.go:15
↓ 57 callersMethodGet
Get retrieves the expansion for a specified alias.
internal/gh/gh.go:220
↓ 57 callersMethodName
()
pkg/cmd/pr/shared/templates.go:118
↓ 56 callersMethodError
()
pkg/cmd/project/shared/queries/resolve.go:35
↓ 56 callersMethodOutput
()
internal/run/run.go:18
↓ 56 callersMethodSelect
(prompt string, defaultValue string, options []string)
pkg/cmd/pr/shared/survey.go:40
↓ 56 callersMethodSuccessIcon
()
pkg/iostreams/color.go:192
↓ 49 callersMethodBase
()
pkg/cmd/workflow/shared/shared.go:50
↓ 49 callersMethodChanged
Changed reports whether the attachment flag was passed.
internal/attachments/flags.go:39
↓ 47 callersMethodRender
(logs []byte, w io.Writer, io *iostreams.IOStreams)
pkg/cmd/agent-task/shared/log.go:20
↓ 47 callersMethodStartPager
()
pkg/iostreams/iostreams.go:216
↓ 47 callersMethodStopPager
()
pkg/iostreams/iostreams.go:264
↓ 46 callersMethodStartProgressIndicator
()
pkg/cmd/pr/shared/finder.go:34
↓ 45 callersFunctionNewImmutableSafeURL
NewImmutableSafeURL returns an ImmutableSafeURL that renders url verbatim. Only pass a URL you built yourself from trusted components or received from
internal/safeurl/safeurl.go:120
↓ 44 callersFunctionNewWithHost
NewWithHost is like New with an explicit host name
internal/ghrepo/repo.go:26
↓ 43 callersMethodHelper
()
internal/run/stub.go:16
↓ 43 callersFunctionIndexFor
(options []string, answer string)
internal/prompter/test.go:150
↓ 42 callersMethodEmpty
Empty reports whether the content is empty, for callers that branch on presence without needing the bytes.
pkg/iostreams/untrusted.go:55
↓ 42 callersFunctionGraphQLQuery
(body string, cb func(string, map[string]any))
pkg/httpmock/stub.go:234
↓ 42 callersMethodHelper
()
pkg/httpmock/registry.go:57
↓ 42 callersFunctionMutuallyExclusive
(message string, conditions ...bool)
pkg/cmdutil/errors.go:47
↓ 42 callersMethodValue
Value returns the underlying value and true for a [Some] variant, or the zero value and false for a [None] variant.
pkg/option/option.go:122
↓ 41 callersFunctionAddJSONFlags
(cmd *cobra.Command, exportTarget *Exporter, fields []string)
pkg/cmdutil/json_flags.go:26
↓ 41 callersMethodError
()
pkg/cmd/repo/autolink/view/view_test.go:110
↓ 41 callersFunctionnewTestClient
(reg *httpmock.Registry)
api/client_test.go:17
↓ 40 callersFunctionNew
New creates a TablePrinter from an IOStreams.
internal/tableprinter/table_printer.go:47
↓ 40 callersFunctionNewJSONExporter
NewJSONExporter returns an Exporter to emit JSON.
pkg/cmdutil/json_flags.go:210
↓ 40 callersMethodWarningIcon
()
pkg/iostreams/color.go:200
↓ 40 callersFunctioninitFakeHTTP
()
pkg/cmd/pr/merge/merge_test.go:311
↓ 39 callersFunctionWithHeader
WithHeader defines the column names for a table. Panics if columns is nil or empty.
internal/tableprinter/table_printer.go:92
↓ 38 callersMethodSetQuery
SetQuery sets the query parameter key to value, replacing any existing value.
internal/safeurl/safeurl.go:87
↓ 37 callersMethodBrowse
(string)
pkg/cmd/gist/view/view.go:23
↓ 36 callersMethodGet
(url string)
pkg/cmd/attestation/api/client.go:63
↓ 36 callersMethodGraphQL
GraphQL performs a GraphQL request using the query string and parses the response into data receiver. If there are errors in the response, GraphQLErro
api/client.go:108
↓ 36 callersFunctionbaseRepo
(owner, repo, branch string)
pkg/cmd/pr/merge/merge_test.go:236
↓ 35 callersMethodTitle
()
pkg/cmd/pr/shared/templates.go:121
↓ 35 callersFunctionnewTestManager
(dataDir, updateDir string, client *http.Client, gitClient gitClient, ios *iostreams.IOStreams, extraEnv ...st
pkg/cmd/extension/manager_test.go:48
↓ 35 callersFunctionrunCommand
TODO port to new style tests
pkg/cmd/pr/merge/merge_test.go:251
↓ 34 callersFunctionDisplayURL
DisplayURL returns a copy of the string urlStr removing everything except the scheme, hostname, and path. If the scheme is not specified, "https" is a
internal/text/text.go:71
↓ 34 callersMethodLogin
Login will set user, git protocol, and auth token for the given hostname. If the encrypt option is specified it will first try to store the auth toke
internal/gh/gh.go:185
↓ 34 callersFunctionNewNoResultsError
(message string)
pkg/cmdutil/errors.go:68
↓ 33 callersMethodAdd
(string)
pkg/cmd/status/status.go:169
↓ 33 callersFunctionIsSame
IsSame compares two GitHub repositories
internal/ghrepo/repo.go:79
↓ 32 callersMethodDisplayName
()
api/queries_repo.go:1165
↓ 32 callersFunctionEnableRepoOverride
(cmd *cobra.Command, f *Factory)
pkg/cmdutil/repo_override.go:36
next →1–100 of 6,141, ranked by callers