#![allow(clippy::all)]
pub const NSID: &str = "sh.tangled.repo.getDefaultBranch";
#[derive(Debug, Clone, Default, serde::Serialize)]
pub struct Params {
pub repo: String,
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Output {
#[serde(skip_serializing_if = "Option::is_none", default)]
pub author: Option<
crate::lexicon::sh::tangled::repo::get_default_branch::Signature,
>,
pub hash: String,
#[serde(skip_serializing_if = "Option::is_none", default)]
pub message: Option<String>,
pub name: String,
#[serde(
rename = "shortHash",
skip_serializing_if = "Option::is_none",
default
)]
pub short_hash: Option<String>,
pub when: String,
}
pub fn get_default_branch(
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
}
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Signature {
pub email: String,
pub name: String,
pub when: String,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}