Compare commits

..

1 commit

Author SHA1 Message Date
4269695611 fix: create git graph log to after doing a fetch
Some checks failed
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Rust / build (push) Failing after 9m27s
2024-08-30 07:49:43 +01:00
4 changed files with 64 additions and 18 deletions

View file

@ -1,7 +1,7 @@
//
use actix::prelude::*;
use tracing::{debug, instrument, Instrument as _};
use tracing::{debug, info, instrument, Instrument as _};
use crate::{
repo::{
@ -13,6 +13,7 @@ use crate::{
};
use git_next_core::git::{
self,
validation::positions::{validate, Error, Positions},
UserNotification,
};
@ -111,7 +112,6 @@ impl Handler<ValidateRepo> for RepoActor {
.wait(ctx);
}
Err(Error::UserIntervention(user_notification)) => {
// FIXME: end up here when doing git force push to leave this situation
self.alert_tui(format!("[USER INTERVENTION: {user_notification}]"));
if let UserNotification::CICheckFailed { log, .. }
| UserNotification::DevNotBasedOnMain { log, .. } = &user_notification

View file

@ -1,9 +1,10 @@
use tracing::{debug, info, instrument};
//
use crate::{
git::{self, repository::open::OpenRepositoryLike, RepoDetails, UserNotification},
BranchName, RepoConfig,
};
use tracing::{debug, instrument};
pub type Result<T> = core::result::Result<T, Error>;

View file

@ -75,7 +75,12 @@ mod positions {
);
let repo_config = given::a_repo_config();
let result = validate(&*repository, &repo_details, &repo_config);
let result = validate(
&*repository,
&repo_details,
&repo_config,
git::graph::Log::default(),
);
println!("{result:?}");
let_assert!(Err(err) = result, "validate");
@ -115,7 +120,12 @@ mod positions {
"open repo"
);
let result = validate(&*open_repository, &repo_details, &repo_config);
let result = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default(),
);
println!("{result:?}");
assert!(matches!(
@ -154,7 +164,12 @@ mod positions {
"open repo"
);
let result = validate(&*open_repository, &repo_details, &repo_config);
let result = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default(),
);
println!("{result:?}");
assert!(matches!(
@ -193,7 +208,12 @@ mod positions {
"open repo"
);
let result = validate(&*open_repository, &repo_details, &repo_config);
let result = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default(),
);
println!("{result:?}");
assert!(matches!(
@ -240,7 +260,12 @@ mod positions {
//when
let_assert!(
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
Err(err) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);
@ -325,7 +350,12 @@ mod positions {
//when
let_assert!(
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
Err(err) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);
@ -394,7 +424,12 @@ mod positions {
//when
let_assert!(
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
Err(err) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);
@ -481,7 +516,12 @@ mod positions {
//when
let_assert!(
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
Err(err) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);
@ -567,8 +607,12 @@ mod positions {
//when
let_assert!(
Ok((positions, _git_log)) =
validate(&*open_repository, &repo_details, &repo_config),
Ok(positions) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);
@ -627,8 +671,12 @@ mod positions {
//when
let_assert!(
Ok((positions, _git_log)) =
validate(&*open_repository, &repo_details, &repo_config),
Ok(positions) = validate(
&*open_repository,
&repo_details,
&repo_config,
git::graph::Log::default()
),
"validate"
);

View file

@ -21,9 +21,6 @@ start-ngrok:
ngrok http --domain=${NGROK_DOMAIN} 8080
fi
start-mac-tunnel:
ssh dagon -R7777:localhost:8888
coverage-update:
cargo tarpaulin --lib --out html
echo "Now:\n\topen tarpaulin-report.html"