[llvm] [workflows] Delete user branches that are too long (PR #82845)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 17:02:36 PST 2024


================
@@ -0,0 +1,33 @@
+name: User Branch Rules
+
+permissions:
+  contents: read
+
+
+on:
+  push:
+    branches:
+      - 'users/**'
+
+
+jobs:
+  user-branch-rules:
+    if: github.repository_owner == 'llvm'
+    permissions:
+      contents: write
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check branch length
+        env:
+          GITHUB_TOKEN: ${{ github.token }}
+          MAX_BRANCH_LENGTH: 200
----------------
jrtc27 wrote:

Importantly:

.git/logs/refs/remotes/origin/ is 30 chars, plus NUL, plus <letter>:\ is 34 chars. That leaves just 26 for the path to the checkout if you have a branch that's 200 chars long, but Users\Michael\llvm-project hits that limit exactly (as the first name of the right length to come into my head).

https://github.com/llvm/llvm-project/pull/82845


More information about the llvm-commits mailing list