#![allow(clippy::all)]
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct ConflictInfo {
pub filename: String,
pub reason: String,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
pub const NSID: &str = "sh.tangled.git.temp.analyzeMerge";
#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct Params {
pub branch: String,
pub patch: String,
pub repo: String,
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Output {
#[serde(skip_serializing_if = "Option::is_none", default)]
pub conflicts: Option<
Vec<
crate::lexicon::sh::tangled::git::temp::analyze_merge::ConflictInfo,
>,
>,
pub is_conflicted: bool,
}
pub fn analyze_merge(
http: &reqwest::Client,
base: &str,
params: &Params,
) -> reqwest::RequestBuilder {
let rb = http.get(crate::xrpc::xrpc_url(base, NSID));
let rb = rb.header(reqwest::header::ACCEPT, "application/json");
let rb = crate::xrpc::push_query(rb, params);
rb
}