Title is the display title for a run, falling back to the commit subject if unavailable
()
| 143 | |
| 144 | // Title is the display title for a run, falling back to the commit subject if unavailable |
| 145 | func (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 |
nothing calls this directly
no outgoing calls
no test coverage detected