diff options
Diffstat (limited to 'src/sub_commands/init.rs')
| -rw-r--r-- | src/sub_commands/init.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sub_commands/init.rs b/src/sub_commands/init.rs index 57785db..db90acd 100644 --- a/src/sub_commands/init.rs +++ b/src/sub_commands/init.rs | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | use std::collections::HashMap; | ||
| 2 | |||
| 1 | use anyhow::{Context, Result}; | 3 | use anyhow::{Context, Result}; |
| 2 | use nostr::{FromBech32, PublicKey, ToBech32}; | 4 | use nostr::{FromBech32, PublicKey, ToBech32}; |
| 3 | 5 | ||
| @@ -291,7 +293,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 291 | println!("publishing repostory reference..."); | 293 | println!("publishing repostory reference..."); |
| 292 | 294 | ||
| 293 | let repo_event = RepoRef { | 295 | let repo_event = RepoRef { |
| 294 | identifier, | 296 | identifier: identifier.clone(), |
| 295 | name, | 297 | name, |
| 296 | description, | 298 | description, |
| 297 | root_commit: earliest_unique_commit, | 299 | root_commit: earliest_unique_commit, |
| @@ -299,6 +301,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 299 | web, | 301 | web, |
| 300 | relays: relays.clone(), | 302 | relays: relays.clone(), |
| 301 | maintainers: maintainers.clone(), | 303 | maintainers: maintainers.clone(), |
| 304 | events: HashMap::new(), | ||
| 302 | } | 305 | } |
| 303 | .to_event(&signer) | 306 | .to_event(&signer) |
| 304 | .await?; | 307 | .await?; |
| @@ -322,7 +325,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 322 | } | 325 | } |
| 323 | Err(_) => true, | 326 | Err(_) => true, |
| 324 | } { | 327 | } { |
| 325 | save_repo_config_to_yaml(&git_repo, maintainers.clone(), relays.clone())?; | 328 | save_repo_config_to_yaml( |
| 329 | &git_repo, | ||
| 330 | identifier.clone(), | ||
| 331 | maintainers.clone(), | ||
| 332 | relays.clone(), | ||
| 333 | )?; | ||
| 326 | println!( | 334 | println!( |
| 327 | "maintainers.yaml {}. commit and push.", | 335 | "maintainers.yaml {}. commit and push.", |
| 328 | if repo_config_result.is_err() { | 336 | if repo_config_result.is_err() { |