Przeglądaj źródła

ci: customize the size buckets

Introduce a new Large category between Medium (80-200 lines)
and Huge (200-2000 lines).

Large covers 200-500, which some device configs seem to reach.
This means Huge (where auto PR comments start being added)
now covers 500-2000 lines.
Jason Rumney 1 miesiąc temu
rodzic
commit
350c63c4ca
2 zmienionych plików z 26 dodań i 2 usunięć
  1. 24 0
      .github/sizeBuckets.yml
  2. 2 2
      .github/workflows/label-pr-size.yml

+ 24 - 0
.github/sizeBuckets.yml

@@ -0,0 +1,24 @@
+buckets:
+  - maxSize: 80
+    label: 😇 Small
+    comment: null
+  - maxSize: 200
+    label: 🙂 Medium
+    comment: null
+  - maxSize: 500
+    label: 🙂 Large
+    comment: null
+  - maxSize: 2000
+    label: 😵 Huge
+    comment: >
+      👮‍♀️⚠️ Your PR seems to be larger than normal. Please check that you
+      did not accidentally submit something you did not intend to.
+      If you are submitting multiple new devices, please consider splitting
+      them into separate PRs.
+  - maxSize: Infinity
+    label: 🤯 Insane
+    comment: >
+      👮‍♀️🛑 This PR's diff size is quite huge.
+      Hopefully you know what you're doing.
+      If you did not commit a lot of autogenerated files intentionally,
+      there are few good reasons for this.

+ 2 - 2
.github/workflows/label-pr-size.yml

@@ -13,5 +13,5 @@ jobs:
       - name: Label and comment PR
         uses: boschresearch/pr-size-labeler@v5
         # Uncomment these lines if you want to use your own custom configuration
-        # with:
-        #   bucketConfigFile: "<PATH_TO_YOUR_BUCKET_CONFIG>"
+        with:
+          bucketConfigFile: ".github/sizeBuckets.yml"