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

Method Title

pkg/cmd/run/shared/shared.go:145–156  ·  view source on GitHub ↗

Title is the display title for a run, falling back to the commit subject if unavailable

()

Source from the content-addressed store, hash-verified

143
144// Title is the display title for a run, falling back to the commit subject if unavailable
145func (r Run) Title() string {
146 if r.DisplayTitle != "" {
147 return r.DisplayTitle
148 }
149
150 commitLines := strings.Split(r.HeadCommit.Message, "\n")
151 if len(commitLines) > 0 {
152 return commitLines[0]
153 } else {
154 return r.HeadSha[0:8]
155 }
156}
157
158// WorkflowName returns the human-readable name of the workflow that this run belongs to.
159// TODO: consider lazy-loading the underlying API data to avoid extra API calls unless necessary

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected