(message: &str)
| 67 | } |
| 68 | |
| 69 | fn extract_branch_from_message(message: &str) -> String { |
| 70 | // Parse patterns like "WIP on main: abc123 message" or "On main: message" |
| 71 | if let Some(rest) = message |
| 72 | .strip_prefix("WIP on ") |
| 73 | .or_else(|| message.strip_prefix("On ")) |
| 74 | { |
| 75 | if let Some(colon_pos) = rest.find(':') { |
| 76 | return rest[..colon_pos].to_string(); |
| 77 | } |
| 78 | } |
| 79 | "unknown".to_string() |
| 80 | } |
| 81 | |
| 82 | fn format_git_time(time: git2::Time) -> String { |
| 83 | let timestamp = time.seconds(); |