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

Function printLinkedBranches

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

Source from the content-addressed store, hash-verified

340}
341
342func printLinkedBranches(io *iostreams.IOStreams, branches []api.LinkedBranch) {
343 cs := io.ColorScheme()
344 table := tableprinter.New(io, tableprinter.WithHeader("BRANCH", "URL"))
345 for _, branch := range branches {
346 table.AddField(branch.BranchName, tableprinter.WithColor(cs.ColorFromString("cyan")))
347 table.AddField(branch.URL)
348 table.EndRow()
349 }
350 _ = table.Render()
351}
352
353func checkoutBranch(opts *DevelopOptions, branchRepo ghrepo.Interface, checkoutBranch string, worktreeTarget prShared.WorktreeTarget) (err error) {
354 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