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

xiaokang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git


The following commit(s) were added to refs/heads/main by this push:
     new 17be94a4 fix(ci): validate pull request titles instead of merge-ref 
commit messages (#895)
17be94a4 is described below

commit 17be94a4d68d2fb23caf1702c9de38abe24df3ee
Author: Jinye Wu <[email protected]>
AuthorDate: Mon Mar 2 14:16:12 2026 +0800

    fix(ci): validate pull request titles instead of merge-ref commit messages 
(#895)
---
 .github/workflows/ci.yml       |  8 +-----
 .github/workflows/pr-title.yml | 63 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 63c70b5e..5d2cba9e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -102,12 +102,6 @@ jobs:
         pre-commit install
         pre-commit run clang-format -a
 
-    - name: Validate commit message format
-      run: |
-        COMMIT_MSG=$(git log -1 --pretty=%B)
-        echo "$COMMIT_MSG" > .git/COMMIT_EDITMSG
-        pre-commit run --hook-stage commit-msg --commit-msg-filename 
.git/COMMIT_EDITMSG 
-
     - name: cpplint
       working-directory: "cpp/build"
       run: |
@@ -274,4 +268,4 @@ jobs:
       uses: actions/upload-artifact@v4
       with:
         name: macos-${{ matrix.macos-version }}-libgraphar.a
-        path: cpp/build-static/libgraphar.a
\ No newline at end of file
+        path: cpp/build-static/libgraphar.a
diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml
new file mode 100644
index 00000000..66b8601d
--- /dev/null
+++ b/.github/workflows/pr-title.yml
@@ -0,0 +1,63 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: GraphAr Pull Request Title Check
+
+on:
+  pull_request_target:
+    branches:
+      - main
+    types:
+      - opened
+      - edited
+      - reopened
+      - synchronize
+      - ready_for_review
+
+concurrency:
+  group: ${{ github.repository }}-${{ github.event.number || github.head_ref 
|| github.sha }}-${{ github.workflow }}
+  cancel-in-progress: true
+
+permissions:
+  pull-requests: read
+
+jobs:
+  validate-title:
+    name: Validate pull request title
+    runs-on: ubuntu-latest
+    steps:
+      - uses: amannn/action-semantic-pull-request@v6
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          types: |
+            feat
+            fix
+            docs
+            style
+            refactor
+            test
+            chore
+            perf
+            ci
+            build
+            revert
+          requireScope: false
+          subjectPattern: ^.+$
+          subjectPatternError: |
+            The subject "{subject}" found in the pull request title "{title}"
+            is empty. Please provide a meaningful description.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to