Compare commits
2 commits
4269695611
...
6e3aef2e84
Author | SHA1 | Date | |
---|---|---|---|
6e3aef2e84 | |||
6efe82d5b6 |
4 changed files with 18 additions and 64 deletions
|
@ -1,7 +1,7 @@
|
|||
//
|
||||
use actix::prelude::*;
|
||||
|
||||
use tracing::{debug, info, instrument, Instrument as _};
|
||||
use tracing::{debug, instrument, Instrument as _};
|
||||
|
||||
use crate::{
|
||||
repo::{
|
||||
|
@ -13,7 +13,6 @@ use crate::{
|
|||
};
|
||||
|
||||
use git_next_core::git::{
|
||||
self,
|
||||
validation::positions::{validate, Error, Positions},
|
||||
UserNotification,
|
||||
};
|
||||
|
@ -112,6 +111,7 @@ 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,10 +1,9 @@
|
|||
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,12 +75,7 @@ mod positions {
|
|||
);
|
||||
let repo_config = given::a_repo_config();
|
||||
|
||||
let result = validate(
|
||||
&*repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default(),
|
||||
);
|
||||
let result = validate(&*repository, &repo_details, &repo_config);
|
||||
println!("{result:?}");
|
||||
let_assert!(Err(err) = result, "validate");
|
||||
|
||||
|
@ -120,12 +115,7 @@ mod positions {
|
|||
"open repo"
|
||||
);
|
||||
|
||||
let result = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default(),
|
||||
);
|
||||
let result = validate(&*open_repository, &repo_details, &repo_config);
|
||||
println!("{result:?}");
|
||||
|
||||
assert!(matches!(
|
||||
|
@ -164,12 +154,7 @@ mod positions {
|
|||
"open repo"
|
||||
);
|
||||
|
||||
let result = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default(),
|
||||
);
|
||||
let result = validate(&*open_repository, &repo_details, &repo_config);
|
||||
println!("{result:?}");
|
||||
|
||||
assert!(matches!(
|
||||
|
@ -208,12 +193,7 @@ mod positions {
|
|||
"open repo"
|
||||
);
|
||||
|
||||
let result = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default(),
|
||||
);
|
||||
let result = validate(&*open_repository, &repo_details, &repo_config);
|
||||
println!("{result:?}");
|
||||
|
||||
assert!(matches!(
|
||||
|
@ -260,12 +240,7 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Err(err) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
@ -350,12 +325,7 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Err(err) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
@ -424,12 +394,7 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Err(err) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
@ -516,12 +481,7 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Err(err) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Err(err) = validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
@ -607,12 +567,8 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Ok(positions) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Ok((positions, _git_log)) =
|
||||
validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
@ -671,12 +627,8 @@ mod positions {
|
|||
|
||||
//when
|
||||
let_assert!(
|
||||
Ok(positions) = validate(
|
||||
&*open_repository,
|
||||
&repo_details,
|
||||
&repo_config,
|
||||
git::graph::Log::default()
|
||||
),
|
||||
Ok((positions, _git_log)) =
|
||||
validate(&*open_repository, &repo_details, &repo_config),
|
||||
"validate"
|
||||
);
|
||||
|
||||
|
|
3
justfile
3
justfile
|
@ -21,6 +21,9 @@ 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