MCPcopy Create free account
hub / github.com/cli/cli / getRemotes

Function getRemotes

pkg/cmd/pr/create/create.go:1083–1094  ·  view source on GitHub ↗
(opts *CreateOptions)

Source from the content-addressed store, hash-verified

1081}
1082
1083func getRemotes(opts *CreateOptions) (ghContext.Remotes, error) {
1084 // TODO: consider obtaining remotes from GitClient instead
1085 remotes, err := opts.Remotes()
1086 if err != nil {
1087 // When a repo override value is given, ignore errors when fetching git remotes
1088 // to support using this command outside of git repos.
1089 if opts.RepoOverride == "" {
1090 return nil, err
1091 }
1092 }
1093 return remotes, nil
1094}
1095
1096func submitPR(opts CreateOptions, ctx CreateContext, state shared.IssueMetadataState, projectV1Support gh.ProjectsV1Support, uploader *attachments.Uploader) error {
1097 client := ctx.Client

Callers 2

NewCreateContextFunction · 0.85

Calls 1

RemotesMethod · 0.65

Tested by

no test coverage detected