chore: Format files
This commit is contained in:
parent
2f6b2b4b70
commit
44cecab3f4
42 changed files with 130 additions and 108 deletions
|
|
@ -8,10 +8,10 @@ use bon::Builder;
|
|||
use clap::Args;
|
||||
use clap_complete::Shell;
|
||||
use colored::Colorize;
|
||||
use fuzzy_matcher::{skim::SkimMatcherV2, FuzzyMatcher};
|
||||
use fuzzy_matcher::{FuzzyMatcher, skim::SkimMatcherV2};
|
||||
use log::{debug, error, trace};
|
||||
use miette::{IntoDiagnostic, Result};
|
||||
use requestty::question::{completions, Completions};
|
||||
use requestty::question::{Completions, completions};
|
||||
use std::time::Duration;
|
||||
|
||||
use super::BlueBuildCommand;
|
||||
|
|
@ -85,15 +85,22 @@ impl BugReportCommand {
|
|||
.default(true)
|
||||
.build();
|
||||
|
||||
println!("{} To avoid any sensitive data from being exposed, please review the included information before proceeding.", "Warning:".on_bright_red().bright_white());
|
||||
println!("Data forwarded to GitHub is subject to GitHub's privacy policy. For more information, see https://docs.github.com/en/github/site-policy/github-privacy-statement.\n");
|
||||
println!(
|
||||
"{} To avoid any sensitive data from being exposed, please review the included information before proceeding.",
|
||||
"Warning:".on_bright_red().bright_white()
|
||||
);
|
||||
println!(
|
||||
"Data forwarded to GitHub is subject to GitHub's privacy policy. For more information, see https://docs.github.com/en/github/site-policy/github-privacy-statement.\n"
|
||||
);
|
||||
match requestty::prompt_one(question) {
|
||||
Ok(answer) => {
|
||||
if answer.as_bool().unwrap() {
|
||||
let link = make_github_issue_link(&issue_body);
|
||||
if let Err(e) = open::that(&link) {
|
||||
println!("Failed to open issue report in your browser: {e}");
|
||||
println!("Please copy the above report and open an issue manually, or try opening the following link:\n{link}");
|
||||
println!(
|
||||
"Please copy the above report and open an issue manually, or try opening the following link:\n{link}"
|
||||
);
|
||||
return Err(e).into_diagnostic();
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ use std::path::{Path, PathBuf};
|
|||
|
||||
use blue_build_process_management::{
|
||||
drivers::{
|
||||
BuildDriver, CiDriver, Driver, DriverArgs, SigningDriver,
|
||||
opts::{
|
||||
BuildTagPushOpts, CheckKeyPairOpts, CompressionType, GenerateImageNameOpts,
|
||||
GenerateTagsOpts, SignVerifyOpts,
|
||||
},
|
||||
types::Platform,
|
||||
BuildDriver, CiDriver, Driver, DriverArgs, SigningDriver,
|
||||
},
|
||||
logging::{color_str, gen_random_ansi_color},
|
||||
};
|
||||
|
|
@ -25,7 +25,7 @@ use blue_build_utils::{
|
|||
use bon::Builder;
|
||||
use clap::Args;
|
||||
use log::{info, trace, warn};
|
||||
use miette::{bail, IntoDiagnostic, Result};
|
||||
use miette::{IntoDiagnostic, Result, bail};
|
||||
use oci_distribution::Reference;
|
||||
use tempfile::TempDir;
|
||||
|
||||
|
|
@ -332,8 +332,8 @@ impl BuildCommand {
|
|||
#[cfg(feature = "rechunk")]
|
||||
let images = if self.rechunk {
|
||||
use blue_build_process_management::drivers::{
|
||||
opts::{GetMetadataOpts, RechunkOpts},
|
||||
InspectDriver, RechunkDriver,
|
||||
opts::{GetMetadataOpts, RechunkOpts},
|
||||
};
|
||||
|
||||
let base_image: Reference = format!("{}:{}", &recipe.base_image, &recipe.image_version)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use std::{
|
|||
};
|
||||
|
||||
use blue_build_process_management::drivers::{
|
||||
opts::GetMetadataOpts, types::Platform, CiDriver, Driver, DriverArgs, InspectDriver,
|
||||
CiDriver, Driver, DriverArgs, InspectDriver, opts::GetMetadataOpts, types::Platform,
|
||||
};
|
||||
use blue_build_recipe::Recipe;
|
||||
use blue_build_template::{ContainerFileTemplate, Template};
|
||||
|
|
@ -14,7 +14,7 @@ use blue_build_utils::{
|
|||
};
|
||||
use bon::Builder;
|
||||
use cached::proc_macro::cached;
|
||||
use clap::{crate_version, Args};
|
||||
use clap::{Args, crate_version};
|
||||
use log::{debug, info, trace, warn};
|
||||
use miette::{IntoDiagnostic, Result};
|
||||
use oci_distribution::Reference;
|
||||
|
|
|
|||
|
|
@ -7,16 +7,16 @@ use blue_build_recipe::Recipe;
|
|||
use blue_build_utils::{constants::ARCHIVE_SUFFIX, string_vec, traits::CowCollecter};
|
||||
use bon::Builder;
|
||||
use clap::{Args, Subcommand, ValueEnum};
|
||||
use miette::{bail, Context, IntoDiagnostic, Result};
|
||||
use miette::{Context, IntoDiagnostic, Result, bail};
|
||||
use oci_distribution::Reference;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use blue_build_process_management::{
|
||||
drivers::{opts::RunOpts, Driver, DriverArgs, RunDriver},
|
||||
drivers::{Driver, DriverArgs, RunDriver, opts::RunOpts},
|
||||
run_volumes,
|
||||
};
|
||||
|
||||
use super::{build::BuildCommand, BlueBuildCommand};
|
||||
use super::{BlueBuildCommand, build::BuildCommand};
|
||||
|
||||
#[derive(Clone, Debug, Builder, Args)]
|
||||
pub struct GenerateIsoCommand {
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ use std::{
|
|||
};
|
||||
|
||||
use blue_build_process_management::drivers::{
|
||||
opts::GenerateKeyPairOpts, CiDriver, Driver, DriverArgs, GitlabDriver, SigningDriver,
|
||||
CiDriver, Driver, DriverArgs, GitlabDriver, SigningDriver, opts::GenerateKeyPairOpts,
|
||||
};
|
||||
use blue_build_template::{GitlabCiTemplate, InitReadmeTemplate, Template};
|
||||
use blue_build_utils::constants::{COSIGN_PUB_PATH, RECIPE_FILE, RECIPE_PATH, TEMPLATE_REPO_URL};
|
||||
use bon::Builder;
|
||||
use clap::{crate_version, Args, ValueEnum};
|
||||
use clap::{Args, ValueEnum, crate_version};
|
||||
use comlexr::cmd;
|
||||
use log::{debug, info, trace};
|
||||
use miette::{bail, miette, Context, IntoDiagnostic, Report, Result};
|
||||
use requestty::{questions, Answer, Answers, OnEsc};
|
||||
use miette::{Context, IntoDiagnostic, Report, Result, bail, miette};
|
||||
use requestty::{Answer, Answers, OnEsc, questions};
|
||||
use semver::Version;
|
||||
|
||||
use crate::commands::BlueBuildCommand;
|
||||
|
|
@ -202,8 +202,7 @@ impl InitCommand {
|
|||
},
|
||||
Input {
|
||||
name: Self::REGISTRY,
|
||||
message:
|
||||
"What is the registry for the image? (e.g. ghcr.io or registry.gitlab.com)",
|
||||
message: "What is the registry for the image? (e.g. ghcr.io or registry.gitlab.com)",
|
||||
when: when!(self.common.registry.is_none()),
|
||||
on_esc: OnEsc::Terminate,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::io::{self, Read};
|
|||
use blue_build_process_management::drivers::{BuildDriver, Driver, DriverArgs, SigningDriver};
|
||||
use blue_build_utils::credentials::{Credentials, CredentialsArgs};
|
||||
use clap::Args;
|
||||
use miette::{bail, IntoDiagnostic, Result};
|
||||
use miette::{IntoDiagnostic, Result, bail};
|
||||
use requestty::questions;
|
||||
|
||||
use super::BlueBuildCommand;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use blue_build_process_management::drivers::{opts::PruneOpts, BuildDriver, Driver, DriverArgs};
|
||||
use blue_build_process_management::drivers::{BuildDriver, Driver, DriverArgs, opts::PruneOpts};
|
||||
use bon::Builder;
|
||||
use clap::Args;
|
||||
use colored::Colorize;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use clap::Args;
|
|||
use comlexr::cmd;
|
||||
use indicatif::ProgressBar;
|
||||
use log::{debug, trace};
|
||||
use miette::{bail, IntoDiagnostic, Result};
|
||||
use miette::{IntoDiagnostic, Result, bail};
|
||||
use tempfile::TempDir;
|
||||
|
||||
use crate::{commands::build::BuildCommand, rpm_ostree_status::RpmOstreeStatus};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use bon::Builder;
|
|||
use clap::Args;
|
||||
use colored::Colorize;
|
||||
use log::{debug, info, trace};
|
||||
use miette::{bail, miette, Context, IntoDiagnostic, Report};
|
||||
use miette::{Context, IntoDiagnostic, Report, bail, miette};
|
||||
use rayon::prelude::*;
|
||||
use schema_validator::SchemaValidator;
|
||||
use serde::de::DeserializeOwned;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ use bon::bon;
|
|||
use jsonschema::paths::LocationSegment;
|
||||
use miette::SourceSpan;
|
||||
use yaml_rust2::{
|
||||
Event,
|
||||
parser::{MarkedEventReceiver, Parser},
|
||||
scanner::Marker,
|
||||
Event,
|
||||
};
|
||||
|
||||
#[cfg(not(test))]
|
||||
|
|
@ -147,7 +147,7 @@ where
|
|||
return Err(YamlSpanError::ExpectIndexFoundKey {
|
||||
key: key.to_owned(),
|
||||
index,
|
||||
})
|
||||
});
|
||||
}
|
||||
(Event::SequenceStart(_, _), LocationSegment::Index(index)) => {
|
||||
break self.sequence(index, 0);
|
||||
|
|
@ -159,7 +159,7 @@ where
|
|||
self.skip_mapping(marker.index());
|
||||
}
|
||||
(Event::MappingEnd, _) => {
|
||||
return Err(YamlSpanError::EndOfMapNoKey(expected_key.to_string()))
|
||||
return Err(YamlSpanError::EndOfMapNoKey(expected_key.to_string()));
|
||||
}
|
||||
event => unreachable!("{event:?}"),
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ where
|
|||
return Err(YamlSpanError::UnexpectedScalar {
|
||||
value: value.to_owned(),
|
||||
segment: segment.to_string(),
|
||||
})
|
||||
});
|
||||
}
|
||||
(Event::MappingStart(_, _), Some(LocationSegment::Property(key))) => {
|
||||
self.key(LocationSegment::Property(key))?
|
||||
|
|
@ -290,7 +290,7 @@ where
|
|||
mod test {
|
||||
use std::sync::Arc;
|
||||
|
||||
use miette::{miette, LabeledSpan};
|
||||
use miette::{LabeledSpan, miette};
|
||||
use rstest::rstest;
|
||||
|
||||
use crate::commands::validate::location::Location;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue