feat: implement Default for CreateRepoOptions
This commit is contained in:
parent
b5d57249fa
commit
6c6f992ef9
3 changed files with 19 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -224,7 +224,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|||
|
||||
[[package]]
|
||||
name = "forgejo-api-types"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "forgejo-api-types"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
edition = "2021"
|
||||
license = "AGPL-3.0-or-later"
|
||||
keywords = ["forgejo", "types", "codeberg", "api"]
|
||||
|
|
|
@ -30,3 +30,20 @@ pub struct CreateRepoOption {
|
|||
/// TrustModel of the repository.
|
||||
pub trust_model: TrustModel,
|
||||
}
|
||||
|
||||
impl Default for CreateRepoOption {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
auto_init: AutoInit::Yes,
|
||||
default_branch: String::from("main"),
|
||||
description: String::from("An empty repository."),
|
||||
gitignores: String::default(),
|
||||
issue_labels: String::default(),
|
||||
license: String::default(),
|
||||
name: String::from("NewRepo"),
|
||||
private: IsPrivate::Yes,
|
||||
template: IsTemplate::No,
|
||||
trust_model: TrustModel::Default,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue