Skip to content

Commit

Permalink
feat: add description option when creating repo
Browse files Browse the repository at this point in the history
  • Loading branch information
benpueschel committed Jul 18, 2024
1 parent 87fe5ca commit 0ffd216
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub enum Args {
private: bool,
#[arg(short, long, help = "Clone the repository after creation")]
clone: bool,
#[arg(short, long, help = "Description of the repository")]
description: Option<String>,
#[arg(short, long, help = "Initialize the repository with a README.md")]
init: bool,
#[arg(
Expand Down
3 changes: 2 additions & 1 deletion src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ pub async fn list_remotes() -> Result<()> {
pub async fn create_repository(
private: bool,
clone: bool,
description: Option<String>,
init: bool,
license: Option<String>,
name: String,
Expand All @@ -306,7 +307,7 @@ pub async fn create_repository(
log::highlight("Creating repository '", &name, "'...");
let info = RepoCreateInfo {
name: name.clone(),
description: None,
description,
license,
init,
private,
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ async fn main() -> Result<()> {
Args::Create {
private,
clone,
description,
init,
license,
name,
remote,
} => commands::create_repository(private, clone, init, license, name, remote).await,
} => commands::create_repository(private, clone, description, init, license, name, remote).await,
Args::Delete { name, remote } => commands::delete_repository(&name, &remote).await,
Args::Auth { remote } => commands::auth(&remote).await,
};
Expand Down

0 comments on commit 0ffd216

Please sign in to comment.