From 25776f714ed5a79d58aeebd902db870d178f8165 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 30 May 2021 15:45:13 +0200 Subject: Add repository description when mirroring Copy the repository description from GitHub into the clone repo. --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 478ffab..89473ea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,6 +74,7 @@ async fn main() { mirror( &repo.git_url, &clone_path, + repo.description.as_deref(), ).unwrap(); db.repo_insert(db_repo).await.unwrap(); @@ -88,12 +89,13 @@ async fn main() { fn mirror>( url: &str, clone_path: P, + description: Option<&str>, ) -> Result<(), Box> { // mirror database // update description // copy cgitrc - git::mirror(url, clone_path)?; + git::mirror(url, clone_path, description)?; Ok(()) } -- cgit v1.2.3