MCPcopy Index your code
hub / github.com/cli/cli / displayName

Method displayName

pkg/cmd/codespace/common.go:193–208  ·  view source on GitHub ↗

displayName formats the codespace name for the interactive selector prompt.

(includeOwner bool)

Source from the content-addressed store, hash-verified

191
192// displayName formats the codespace name for the interactive selector prompt.
193func (c codespace) displayName(includeOwner bool) string {
194 branch := c.branchWithGitStatus()
195 displayName := c.DisplayName
196
197 if displayName == "" {
198 displayName = c.Name
199 }
200
201 description := fmt.Sprintf("%s [%s]: %s", c.Repository.FullName, branch, displayName)
202
203 if includeOwner {
204 description = fmt.Sprintf("%-15s %s", c.Owner.Login, description)
205 }
206
207 return description
208}
209
210// gitStatusDirty represents an unsaved changes status.
211const gitStatusDirty = "*"

Callers 2

Calls 1

branchWithGitStatusMethod · 0.95

Tested by 1