@@ -342,34 +342,48 @@ def capture_pr_screenshots(pr_url: str, task_id: str = "") -> list[str]:
342342
343343
344344def _append_screenshots_to_pr (
345- config : TaskConfig , setup : RepoSetup , screenshot_urls : list [str ],
345+ config : TaskConfig ,
346+ setup : RepoSetup ,
347+ screenshot_urls : list [str ],
346348) -> None :
347349 """Append ## Screenshots section to PR body via gh pr edit."""
348350 if not screenshot_urls :
349351 return
350352 try :
351353 result = subprocess .run (
352- ["gh" , "pr" , "view" , setup .branch , "--repo" , config .repo_url ,
353- "--json" , "body" , "-q" , ".body" ],
354+ [
355+ "gh" ,
356+ "pr" ,
357+ "view" ,
358+ setup .branch ,
359+ "--repo" ,
360+ config .repo_url ,
361+ "--json" ,
362+ "body" ,
363+ "-q" ,
364+ ".body" ,
365+ ],
354366 cwd = setup .repo_dir ,
355- capture_output = True , text = True , timeout = 30 ,
367+ capture_output = True ,
368+ text = True ,
369+ timeout = 30 ,
356370 )
357371 if result .returncode != 0 :
358372 log ("WARN" , "Could not read PR body for screenshot append" )
359373 return
360374
361375 current_body = result .stdout .strip ()
362376 images_md = "\n " .join (
363- f""
364- for i , url in enumerate (screenshot_urls )
377+ f"" for i , url in enumerate (screenshot_urls )
365378 )
366379 updated_body = f"{ current_body } \n \n ## Screenshots\n \n { images_md } "
367380
368381 subprocess .run (
369- ["gh" , "pr" , "edit" , setup .branch , "--repo" , config .repo_url ,
370- "--body" , updated_body ],
382+ ["gh" , "pr" , "edit" , setup .branch , "--repo" , config .repo_url , "--body" , updated_body ],
371383 cwd = setup .repo_dir ,
372- capture_output = True , text = True , timeout = 30 ,
384+ capture_output = True ,
385+ text = True ,
386+ timeout = 30 ,
373387 )
374388 log ("POST" , f"Appended { len (screenshot_urls )} screenshot(s) to PR body" )
375389 except Exception as e :
0 commit comments