upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/push.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/push.rs b/src/lib/push.rs
index 4c2d8f1..c202397 100644
--- a/src/lib/push.rs
+++ b/src/lib/push.rs
@@ -330,6 +330,7 @@ pub async fn push_refs_and_generate_pr_or_pr_update_event(
330 root_proposal: Option<&Event>, 330 root_proposal: Option<&Event>,
331 title_description_overide: &Option<(String, String)>, 331 title_description_overide: &Option<(String, String)>,
332 servers: &[String], 332 servers: &[String],
333 git_ref: Option<String>,
333 signer: &Arc<dyn NostrSigner>, 334 signer: &Arc<dyn NostrSigner>,
334 term: &Term, 335 term: &Term,
335) -> Result<(Option<Vec<Event>>, Vec<(String, Result<()>)>)> { 336) -> Result<(Option<Vec<Event>>, Vec<(String, Result<()>)>)> {
@@ -352,7 +353,12 @@ pub async fn push_refs_and_generate_pr_or_pr_update_event(
352 )? 353 )?
353 }; 354 };
354 355
355 let refspec = format!("{}:refs/nostr/{}", tip, draft_pr_event.id()); 356 let git_ref_used = git_ref
357 .clone()
358 .unwrap_or("refs/nostr/<event-id>".to_string())
359 .replace("<event-id>", &draft_pr_event.id().to_string());
360
361 let refspec = format!("{tip}:{git_ref_used}");
356 362
357 if let Err(error) = push_to_remote_url(git_repo, clone_url, &[refspec], term) { 363 if let Err(error) = push_to_remote_url(git_repo, clone_url, &[refspec], term) {
358 term.write_line( 364 term.write_line(