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

Method displayName

pkg/cmd/codespace/common.go:194–209  ·  view source on GitHub ↗

displayName formats the codespace name for the interactive selector prompt.

(includeOwner bool)

Source from the content-addressed store, hash-verified

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

Callers 2

Calls 1

branchWithGitStatusMethod · 0.95

Tested by 1