From 60158266b8a397d4f8850d325dfcff3d4890bb61 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 29 Nov 2024 15:57:54 -0800 Subject: [PATCH] Allow empty commit message Although this is unlikely (or impossible?) to ever happen in practice, I don't feel comfortable with crashing triagebot if it ever happens. --- src/handlers/milestone_prs.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/handlers/milestone_prs.rs b/src/handlers/milestone_prs.rs index 48150ed5..c2147633 100644 --- a/src/handlers/milestone_prs.rs +++ b/src/handlers/milestone_prs.rs @@ -158,12 +158,7 @@ async fn milestone_cargo( // * Cargo's PR never got merged as fast-forward / rebase / squash merge. commit.parents.len() == 2) .filter_map(|commit| { - let first = commit - .commit - .message - .lines() - .next() - .expect("commit message"); + let first = commit.commit.message.lines().next().unwrap_or_default(); merge_re.captures(first).map(|cap| { cap.get(1) .or_else(|| cap.get(2))