Compare commits

..

2 commits

Author SHA1 Message Date
6e3aef2e84 build: add start-mac-tunnel
All checks were successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-08-30 08:17:10 +01:00
6efe82d5b6 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/tag-created Pipeline was successful
ci/woodpecker/push/push-next Pipeline failed
Rust / build (push) Successful in 7m14s
2024-08-30 08:16:37 +01:00
4 changed files with 18 additions and 64 deletions

View file

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

View file

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

View file

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

View file

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