diff --git a/Cargo.lock b/Cargo.lock index fa6473a..bf5414a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,7 +224,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forgejo-api-types" -version = "0.1.2" +version = "0.1.3" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index c03457e..2c40b95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/src/types/api/creation/repository.rs b/src/types/api/creation/repository.rs index 06cdc5d..7c3f116 100644 --- a/src/types/api/creation/repository.rs +++ b/src/types/api/creation/repository.rs @@ -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, + } + } +}