Compare commits
1 commit
6e3aef2e84
...
4269695611
Author | SHA1 | Date | |
---|---|---|---|
4269695611 |
4 changed files with 64 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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>;
|
||||
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
|
||||
|
|
3
justfile
3
justfile
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue