[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 16:59:01 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:

200 seems too high. Git convention is 80 characters for the subject, users//spr/ is 11 characters, GitHub usernames are limited to 39 characters, that gives 130 characters.

(spr can suffix the commit message with a -1 etc when there are conflicts, but that's rare, and there's enough slack in the above in practice that we can ignore all that, e.g, usernames are likely way less than 39 characters)

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


More information about the llvm-commits mailing list