[llvm-branch-commits] [llvm] [Github] Make prune branches workflow save branch patches (PR #178539)

Aiden Grossman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 28 15:54:24 PST 2026


https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/178539

>From 4b427e08b3c3680fcba00cff2cd413673cacd6a8 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 28 Jan 2026 23:54:14 +0000
Subject: [PATCH] fix

Created using spr 1.3.7
---
 .github/workflows/prune-unused-branches.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/prune-unused-branches.py b/.github/workflows/prune-unused-branches.py
index cdc5305cc422d..7c53fab7bc749 100644
--- a/.github/workflows/prune-unused-branches.py
+++ b/.github/workflows/prune-unused-branches.py
@@ -74,9 +74,14 @@ def get_user_branches_to_remove(
 
 def generate_patch_for_branch(branch_name: str) -> bytes:
     command_vector = ["git", "diff", f"main...origin/{branch_name}"]
-    result = subprocess.run(
-        command_vector, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True
-    )
+    try:
+        result = subprocess.run(
+            command_vector, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True
+        )
+    except subprocess.CalledProcessError as process_error:
+        print(process_error.stderr)
+        print(process_error.stdout)
+        raise process_error
     return result.stdout
 
 



More information about the llvm-branch-commits mailing list