Yuki Takei пре 4 година
родитељ
комит
70cea9a0d8
2 измењених фајлова са 25 додато и 6 уклоњено
  1. 6 1
      .github/release-drafter.yml
  2. 19 5
      .github/workflows/update-pr-to-master.yml

+ 6 - 1
.github/release-drafter.yml

@@ -13,7 +13,6 @@ categories:
       - 'bug'
   - title: '🧰 Maintenance'
     labels:
-      - 'chore'
       - 'support'
       - 'dependencies'
 category-template: '### $TITLE'
@@ -33,6 +32,12 @@ autolabeler:
   - label: 'support'
     branch:
       - '/support\/.+/'
+    title:
+      - '/chore/i'
+      - '/ci/i'
+      - '/docs/i'
+      - '/test/i'
+
 exclude-labels:
   - 'exclude from changelog'
 template: |

+ 19 - 5
.github/workflows/update-pr-to-master.yml

@@ -1,11 +1,11 @@
-name: Update PR to master
+name: PR to master
 
 on:
   pull_request:
     branches:
       - master
     # Only following types are handled by the action, but one can default to all as well
-    types: [opened, reopened, synchronize]
+    types: [opened, reopened, edited, synchronize]
 
 jobs:
 
@@ -13,6 +13,8 @@ jobs:
   auto-labeling:
     runs-on: ubuntu-latest
 
+    if: github.event.pull_request.merged == true
+
     steps:
       - uses: release-drafter/release-drafter@v5
         with:
@@ -20,9 +22,21 @@ jobs:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
-  add-comment-history:
+  check-title:
     runs-on: ubuntu-latest
     steps:
-      - uses: technote-space/pr-commit-body-action@v1
+      - uses: amannn/action-semantic-pull-request@v3.4.2
         with:
-          COMMIT_TYPES: feat, imprv, fix, support, chore
+          types: |
+            feat
+            imprv
+            fix
+            support
+            chore
+            ci
+            docs
+            test
+          requireScope: false
+          validateSingleCommit: true
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}