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

sunchao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion-comet.git


The following commit(s) were added to refs/heads/main by this push:
     new cad16d5  build: Add checker for PR title (#151)
cad16d5 is described below

commit cad16d53f7076d6c115613a31afdc1fbc975aa87
Author: Chao Sun <[email protected]>
AuthorDate: Sat Mar 2 11:22:55 2024 -0800

    build: Add checker for PR title (#151)
---
 .github/workflows/pr_build.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml
index aa69aea..d905095 100644
--- a/.github/workflows/pr_build.yml
+++ b/.github/workflows/pr_build.yml
@@ -126,3 +126,18 @@ jobs:
       - if: matrix.test-target == 'java'
         name: Java test steps
         uses: ./.github/actions/java-test
+  check-pr-title:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - name: Check PR title
+        env:
+          PR_TITLE: ${{ github.event.pull_request.title }}
+        run: |
+          if ! echo $PR_TITLE | grep -Eq '^(\w+)(\(.+\))?: .+$'; then
+            echo "PR title does not follow conventional commit style."
+            echo "Please use a title in the format: type: message, or 
type(scope): message"
+            echo "Example: feat: Add support for sort-merge join"
+            exit 1
+          fi
+

Reply via email to