upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sub_commands/prs/create.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands/prs/create.rs')
-rw-r--r--src/sub_commands/prs/create.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/sub_commands/prs/create.rs b/src/sub_commands/prs/create.rs
index 82824a1..8506303 100644
--- a/src/sub_commands/prs/create.rs
+++ b/src/sub_commands/prs/create.rs
@@ -103,7 +103,7 @@ pub async fn launch(
103 let repo_ref = repo_ref::fetch( 103 let repo_ref = repo_ref::fetch(
104 &git_repo, 104 &git_repo,
105 git_repo 105 git_repo
106 .get_root_commit(&to_branch) 106 .get_root_commit()
107 .context("failed to get root commit of the repository")? 107 .context("failed to get root commit of the repository")?
108 .to_string(), 108 .to_string(),
109 &client, 109 &client,
@@ -111,15 +111,8 @@ pub async fn launch(
111 ) 111 )
112 .await?; 112 .await?;
113 113
114 let events = generate_pr_and_patch_events( 114 let events =
115 &title, 115 generate_pr_and_patch_events(&title, &description, &git_repo, &ahead, &keys, &repo_ref)?;
116 &description,
117 &to_branch,
118 &git_repo,
119 &ahead,
120 &keys,
121 &repo_ref,
122 )?;
123 116
124 println!( 117 println!(
125 "posting 1 pull request with {} commits...", 118 "posting 1 pull request with {} commits...",
@@ -315,14 +308,13 @@ pub static PATCH_KIND: u64 = 1617;
315pub fn generate_pr_and_patch_events( 308pub fn generate_pr_and_patch_events(
316 title: &str, 309 title: &str,
317 description: &str, 310 description: &str,
318 to_branch: &str,
319 git_repo: &Repo, 311 git_repo: &Repo,
320 commits: &Vec<Sha1Hash>, 312 commits: &Vec<Sha1Hash>,
321 keys: &nostr::Keys, 313 keys: &nostr::Keys,
322 repo_ref: &RepoRef, 314 repo_ref: &RepoRef,
323) -> Result<Vec<nostr::Event>> { 315) -> Result<Vec<nostr::Event>> {
324 let root_commit = git_repo 316 let root_commit = git_repo
325 .get_root_commit(to_branch) 317 .get_root_commit()
326 .context("failed to get root commit of the repository")?; 318 .context("failed to get root commit of the repository")?;
327 319
328 let mut pr_tags = vec![ 320 let mut pr_tags = vec![