This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f2eda681 feat(semantic pull request): add 
action-semantic-pull-request (#7457)
8f2eda681 is described below

commit 8f2eda681a839f768f2aac774fd492c37b685fe6
Author: wangchengcheng <[email protected]>
AuthorDate: Tue Jul 19 09:10:12 2022 +0800

    feat(semantic pull request): add action-semantic-pull-request (#7457)
---
 .github/actions/action-semantic-pull-request |  1 +
 .github/semantic.yml                         | 15 ------------
 .github/workflows/semantic.yml               | 35 ++++++++++++++++++++++++++++
 .gitmodules                                  |  3 +++
 4 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/.github/actions/action-semantic-pull-request 
b/.github/actions/action-semantic-pull-request
new file mode 160000
index 000000000..348e2e692
--- /dev/null
+++ b/.github/actions/action-semantic-pull-request
@@ -0,0 +1 @@
+Subproject commit 348e2e6922130ee27d6d6a0a3b284890776d1f80
diff --git a/.github/semantic.yml b/.github/semantic.yml
deleted file mode 100644
index 5fe591ed8..000000000
--- a/.github/semantic.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-titleOnly: true
-allowRevertCommits: true
-types:
-  - feat
-  - fix
-  - docs
-  - style
-  - refactor
-  - perf
-  - test
-  - build
-  - ci
-  - chore
-  - revert
-  - change
diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml
new file mode 100644
index 000000000..dc1a79010
--- /dev/null
+++ b/.github/workflows/semantic.yml
@@ -0,0 +1,35 @@
+name: "PR Lint"
+
+on:
+  pull_request_target:
+    types:
+      - opened
+      - edited
+      - synchronize
+
+jobs:
+  main:
+    name: Validate PR title
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out repository code
+        uses: actions/checkout@v3
+        with:
+          submodules: recursive
+      - uses: ./.github/actions/action-semantic-pull-request
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          types: |
+            feat
+            fix
+            docs
+            style
+            refactor
+            perf
+            test
+            build
+            ci
+            chore
+            revert
+            change
diff --git a/.gitmodules b/.gitmodules
index beb354b89..3c8ed44e4 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "t/toolkit"]
        path = t/toolkit
        url = https://github.com/api7/test-toolkit.git
+[submodule ".github/actions/action-semantic-pull-request"]
+       path = .github/actions/action-semantic-pull-request
+       url = https://github.com/amannn/action-semantic-pull-request.git

Reply via email to