MCPcopy
hub / github.com/cli/cli / printLinkedBranches

Function printLinkedBranches

pkg/cmd/issue/develop/develop.go:310–319  ·  view source on GitHub ↗
(io *iostreams.IOStreams, branches []api.LinkedBranch)

Source from the content-addressed store, hash-verified

308}
309
310func printLinkedBranches(io *iostreams.IOStreams, branches []api.LinkedBranch) {
311 cs := io.ColorScheme()
312 table := tableprinter.New(io, tableprinter.WithHeader("BRANCH", "URL"))
313 for _, branch := range branches {
314 table.AddField(branch.BranchName, tableprinter.WithColor(cs.ColorFromString("cyan")))
315 table.AddField(branch.URL)
316 table.EndRow()
317 }
318 _ = table.Render()
319}
320
321func checkoutBranch(opts *DevelopOptions, branchRepo ghrepo.Interface, checkoutBranch string) (err error) {
322 remotes, err := opts.Remotes()

Callers 1

developRunListFunction · 0.85

Calls 5

NewFunction · 0.92
WithHeaderFunction · 0.92
ColorSchemeMethod · 0.80
ColorFromStringMethod · 0.80
RenderMethod · 0.65

Tested by

no test coverage detected