diff --git a/src/server/actors/repo/branch.rs b/src/server/actors/repo/branch.rs index a67b5101..7ccb7a27 100644 --- a/src/server/actors/repo/branch.rs +++ b/src/server/actors/repo/branch.rs @@ -163,28 +163,24 @@ pub async fn advance_next( let next_commit = find_next_commit_on_dev(next, dev_commit_history); let Some(commit) = next_commit else { warn!("No commits to advance next to"); + revalidate_positions(addr).await; return; }; if let Some(problem) = validate_commit_message(commit.message()) { warn!("Can't advance next to commit '{}': {}", commit, problem); + revalidate_positions(addr).await; return; } info!("Advancing next to commit '{}'", commit); - match git.reset( + if let Err(err) = git.reset( &repo_config.branches().next(), commit.into(), ResetForce::None, &repo_details, ) { - Ok(_) => { - // TODO : (#18) sleep and restart while we don't have webhooks - tokio::time::sleep(std::time::Duration::from_secs(10)).await; - addr.do_send(ValidateRepo); - } - Err(err) => { - warn!(?err, "Failed") - } + warn!(?err, "Failed") }; + revalidate_positions(addr).await; } #[tracing::instrument]