vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Make the run list say what triggered each run
57dc79afa8097830de03fc2fc2c19561470b6d36 · Keenan Nemetz · 6d ago · parent 338a19dd
Make the run list say what triggered each run The runs table said only which ref a run used, so a push, an issue event and a manual dispatch looked alike. Give each run a TriggerTitle and show it in a "Triggered by" column; the run page uses the same words. Drop the separate workflows page. The run list is where a job is found, and the run page now links the workflow definition it ran, so a second page listing the same jobs only split the answer. Show the full log viewer only while a run is going. A finished run has per-step logs, and the full log is a download rather than a second copy of every step's output.
ci/runs/runs.go +69
| @@ -189,6 +189,75 @@ func (r *Run) WorkflowTitle() string { | |||
| 189 | 189 | return r.Workflow | |
| 190 | 190 | } | |
| 191 | 191 | ||
| 192 | // TriggerTitle is what started the run, in the words a reader uses for the same | ||
| 193 | // action in the activity feed. A push says where it went; an event says what | ||
| 194 | // happened to the issue, change, or comment. A run from before triggers were | ||
| 195 | // pinned has none. | ||
| 196 | func (r *Run) TriggerTitle() string { | ||
| 197 | switch r.Trigger { | ||
| 198 | case "": | ||
| 199 | return "" | ||
| 200 | case "push": | ||
| 201 | if r.TriggerAction == "combined" { | ||
| 202 | return "combined result" | ||
| 203 | } | ||
| 204 | switch { | ||
| 205 | case r.Tag != "": | ||
| 206 | return "pushed tag " + r.Tag | ||
| 207 | case r.Branch != "": | ||
| 208 | return "pushed to " + r.Branch | ||
| 209 | default: | ||
| 210 | return "pushed" | ||
| 211 | } | ||
| 212 | case "change_request": | ||
| 213 | switch r.TriggerAction { | ||
| 214 | case "opened": | ||
| 215 | return "opened change" | ||
| 216 | case "updated": | ||
| 217 | return "updated change" | ||
| 218 | case "ready": | ||
| 219 | return "marked change ready" | ||
| 220 | case "closed": | ||
| 221 | return "closed change" | ||
| 222 | case "merged": | ||
| 223 | return "merged change" | ||
| 224 | } | ||
| 225 | case "issue": | ||
| 226 | switch r.TriggerAction { | ||
| 227 | case "opened": | ||
| 228 | return "opened issue" | ||
| 229 | case "edited": | ||
| 230 | return "edited issue" | ||
| 231 | case "assigned": | ||
| 232 | return "assigned issue" | ||
| 233 | case "closed": | ||
| 234 | return "closed issue" | ||
| 235 | case "reopened": | ||
| 236 | return "reopened issue" | ||
| 237 | } | ||
| 238 | case "comment": | ||
| 239 | switch r.TriggerAction { | ||
| 240 | case "created": | ||
| 241 | return "commented" | ||
| 242 | case "edited": | ||
| 243 | return "edited a comment" | ||
| 244 | case "deleted": | ||
| 245 | return "deleted a comment" | ||
| 246 | } | ||
| 247 | case "schedule": | ||
| 248 | return "scheduled" | ||
| 249 | case "workflow_dispatch": | ||
| 250 | return "started manually" | ||
| 251 | } | ||
| 252 | // An event this binary does not know about still says what it was rather than | ||
| 253 | // disappearing from the row. | ||
| 254 | title := strings.ReplaceAll(strings.TrimSpace(r.Trigger), "_", " ") | ||
| 255 | if action := strings.ReplaceAll(strings.TrimSpace(r.TriggerAction), "_", " "); action != "" { | ||
| 256 | title += " " + action | ||
| 257 | } | ||
| 258 | return title | ||
| 259 | } | ||
| 260 | |||
| 192 | 261 | // Duration is the wall-clock time from the first lease to the finish. A queued run | |
| 193 | 262 | // has no duration yet; a running one is measured to now so a page can show that it | |
| 194 | 263 | // is still going rather than a stale zero. | |