From 1cacf1bce77b88febc0cf9e2f0f9f468d4b30555 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 1 Feb 2024 09:59:09 +0000 Subject: feat(repo_ref)!: use nip34 kind and tags - change kind number - do not rely on d identifiers for unique commit id. set it as default to unique commit id shorthand. - remove "r-" prefix from unique commit id r tag and instead add checks for SHA1 validity - rename tag git_server to clone - add web tag - use single relays tag instead of multiple relay tags BREAKING CHANGE: change repo event kind and tags to reflect nip34 draft. events with the older kind will no longer be found and will not be in a valid format --- src/sub_commands/claim.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/sub_commands') diff --git a/src/sub_commands/claim.rs b/src/sub_commands/claim.rs index ce39a64..05ad961 100644 --- a/src/sub_commands/claim.rs +++ b/src/sub_commands/claim.rs @@ -23,6 +23,9 @@ pub struct SubCommandArgs { /// optional description description: Option, #[clap(short, long, value_parser, num_args = 1..)] + /// homepage + web: Vec, + #[clap(short, long, value_parser, num_args = 1..)] /// relays contributors push patches and comments to relays: Vec, } @@ -62,6 +65,15 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { ) .context("no git remote origin configured")?; + let web: Vec = if args.web.is_empty() { + Interactor::default() + .input(PromptInputParms::default().with_prompt("description (Optional)"))? + .split(' ') + .map(std::string::ToString::to_string) + .collect() + } else { + args.web.clone() + }; #[cfg(not(test))] let mut client = Client::default(); #[cfg(test)] @@ -120,10 +132,12 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { println!("publishing repostory reference..."); let repo_event = RepoRef { + identifier: root_commit.to_string()[..7].to_string(), name, description, root_commit: root_commit.to_string(), git_server, + web, relays: repo_relays.clone(), maintainers, } -- cgit v1.2.3