upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/repo_ref.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-02-23 13:57:23 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-02-23 13:57:23 +0000
commitd5284b758661c491e6a206570763f2982424b70a (patch)
treecc7d8cee7b535999dc99e466a17127b1a94aee97 /src/repo_ref.rs
parenta9e4c6772a378fd28edbca9b9267d2e7d08bee2c (diff)
feat(init): add customisation and defaults
- allow more cli input options - allow customisation of more fields in interface - change default identifer from shorthand root commit to short name - defaults to existing repo event (users or other) or maintainers.yaml
Diffstat (limited to 'src/repo_ref.rs')
-rw-r--r--src/repo_ref.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/repo_ref.rs b/src/repo_ref.rs
index 8e944d7..c7b42fa 100644
--- a/src/repo_ref.rs
+++ b/src/repo_ref.rs
@@ -152,6 +152,7 @@ pub async fn fetch(
152 #[cfg(not(test))] client: &Client, 152 #[cfg(not(test))] client: &Client,
153 // TODO: more rubust way of finding repo events 153 // TODO: more rubust way of finding repo events
154 fallback_relays: Vec<String>, 154 fallback_relays: Vec<String>,
155 prompt_for_nevent_if_cant_event: bool,
155) -> Result<RepoRef> { 156) -> Result<RepoRef> {
156 let repo_config = get_repo_config_from_yaml(git_repo); 157 let repo_config = get_repo_config_from_yaml(git_repo);
157 158
@@ -187,6 +188,9 @@ pub async fn fetch(
187 { 188 {
188 break event.clone(); 189 break event.clone();
189 } 190 }
191 if !prompt_for_nevent_if_cant_event {
192 bail!("cannot find repo event");
193 }
190 println!("cannot find repo event"); 194 println!("cannot find repo event");
191 loop { 195 loop {
192 let bech32 = Interactor::default() 196 let bech32 = Interactor::default()