Skip to content

update the pr title and body again (just without the UI junk) - #88

Merged
slinder1 merged 1 commit into
users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8from
users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183
Aug 11, 2026
Merged

update the pr title and body again (just without the UI junk)#88
slinder1 merged 1 commit into
users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8from
users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183

Conversation

@slinder1

Copy link
Copy Markdown
Owner

Change-Id: Ia5aa7f68f26c463c4bf7ac4c7023494018583183

@slinder1
slinder1 changed the base branch from main to users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8 August 11, 2026 15:29
@slinder1

Copy link
Copy Markdown
Owner Author
🛠️ Initial changes (click to expand):
diff --git b/src/gh.rs a/src/gh.rs
@@ -354,6 +354,21 @@ impl Pr {
         Ok(())
     }
 
+    pub fn set_details(&mut self, title: &str, body: &str) -> Result<()> {
+        let mut body_arg = ArgInlineOrFile::new("body");
+        let mut cmd = gh();
+        let args = self.args_for("edit", [format!("--title={title}"), body_arg.arg(body)?])?;
+        cmd.args(args);
+        if env::get().dry_run() {
+            eprintln!("would-exec: {:?}", cmd);
+        } else {
+            exec!(env::get(), cmd);
+        }
+        self.title = title.to_owned();
+        self.body = body.to_owned();
+        Ok(())
+    }
+
     pub fn add_details_comment(&self, diff: &Diff) -> Result<()> {
         let (summary, changes) = match diff {
             Diff::InitialDiff(text) => ("Initial changes", text),
diff --git b/src/praddle.rs a/src/praddle.rs
@@ -175,6 +175,22 @@ fn push(args: &cli::Push) -> Result<()> {
     gh::reconcile_stack(&changes.iter().map(|change| &change.pr).collect::<Vec<_>>())
         .context("could not reconcile pr stack")?;
     changes
+        .par_iter_mut()
+        .map(|c| {
+            let commit = c.local_change.commit()?;
+            let title = commit
+                .summary()
+                .context("failed to get commit summary")?
+                .context("commit has no summary")?;
+            let body = commit
+                .body()
+                .context("failed to get commit body")?
+                .context("commit has no body")?;
+            c.pr.set_details(title, body)
+        })
+        .collect::<Result<Vec<_>>>()
+        .context("could not update pr titles and bodies")?;
+    changes
         .par_iter()
         .zip(diffs)
         .map(|(c, diff)| c.pr.add_details_comment(&diff))

@slinder1
slinder1 marked this pull request as ready for review August 11, 2026 15:29
@slinder1
slinder1 marked this pull request as draft August 11, 2026 16:05
@slinder1
slinder1 changed the base branch from users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8 to main August 11, 2026 16:05
@slinder1
slinder1 changed the base branch from main to users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8 August 11, 2026 16:05
@slinder1
slinder1 marked this pull request as ready for review August 11, 2026 16:05
@slinder1
slinder1 force-pushed the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch from 558ebab to 7b403fc Compare August 11, 2026 16:09
@slinder1
slinder1 marked this pull request as draft August 11, 2026 16:29
@slinder1
slinder1 changed the base branch from users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8 to main August 11, 2026 16:29
@slinder1
slinder1 force-pushed the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch from 7b403fc to 5ca35a9 Compare August 11, 2026 16:29
@slinder1
slinder1 changed the base branch from main to users/slinder1/I8c0390e5375d7f66a86313042e52e039230d89e8 August 11, 2026 16:29
@slinder1
slinder1 marked this pull request as ready for review August 11, 2026 16:30
@slinder1
slinder1 force-pushed the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch from 5ca35a9 to e691d3b Compare August 11, 2026 16:58
@slinder1
slinder1 force-pushed the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch from e691d3b to 0ea6bfa Compare August 11, 2026 17:09
Change-Id: Ia5aa7f68f26c463c4bf7ac4c7023494018583183
@slinder1
slinder1 force-pushed the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch from 0ea6bfa to 41d03d4 Compare August 11, 2026 17:20
@slinder1
slinder1 merged commit 29a1a07 into main Aug 11, 2026
3 checks passed
@slinder1
slinder1 deleted the users/slinder1/Ia5aa7f68f26c463c4bf7ac4c7023494018583183 branch August 11, 2026 17:24
slinder1 added a commit that referenced this pull request Aug 12, 2026
Change-Id: Ia5aa7f68f26c463c4bf7ac4c7023494018583183
Assisted-by: opencode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant