forked from kemitix/git-next
chore: clean up some logging
This commit is contained in:
parent
4e6a306a72
commit
8c4ad4b534
2 changed files with 4 additions and 5 deletions
|
@ -128,6 +128,7 @@ pub async fn advance_next(
|
||||||
warn!("Can't advance next to commit '{}': {}", commit, problem);
|
warn!("Can't advance next to commit '{}': {}", commit, problem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
info!("Advancing next to commit '{}'", commit);
|
||||||
match reset(
|
match reset(
|
||||||
&repo_config.branches().next(),
|
&repo_config.branches().next(),
|
||||||
commit,
|
commit,
|
||||||
|
@ -135,7 +136,6 @@ pub async fn advance_next(
|
||||||
&repo_details,
|
&repo_details,
|
||||||
) {
|
) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
info!("Success");
|
|
||||||
// TODO : (#18) sleep and restart while we don't have webhooks
|
// TODO : (#18) sleep and restart while we don't have webhooks
|
||||||
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
||||||
addr.do_send(ValidateRepo);
|
addr.do_send(ValidateRepo);
|
||||||
|
@ -185,6 +185,7 @@ pub async fn advance_main(
|
||||||
repo_details: config::RepoDetails,
|
repo_details: config::RepoDetails,
|
||||||
repo_config: config::RepoConfig,
|
repo_config: config::RepoConfig,
|
||||||
) {
|
) {
|
||||||
|
info!("Advancing main to next");
|
||||||
match reset(
|
match reset(
|
||||||
&repo_config.branches().main(),
|
&repo_config.branches().main(),
|
||||||
next,
|
next,
|
||||||
|
|
|
@ -22,14 +22,12 @@ pub async fn check_next(
|
||||||
forge::forgejo::get_commit_status(next.clone(), &repo_details, net).await
|
forge::forgejo::get_commit_status(next.clone(), &repo_details, net).await
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
info!(?status, "Checking next branch status");
|
info!(?status, "Checking next branch");
|
||||||
match status {
|
match status {
|
||||||
Status::Pass => {
|
Status::Pass => {
|
||||||
addr.do_send(AdvanceMainTo(next));
|
addr.do_send(AdvanceMainTo(next));
|
||||||
}
|
}
|
||||||
Status::Pending => {
|
Status::Pending => {}
|
||||||
info!("Checks are pending");
|
|
||||||
}
|
|
||||||
Status::Fail => {
|
Status::Fail => {
|
||||||
warn!("Checks have failed");
|
warn!("Checks have failed");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue