From 856fe5c22a7a67fe3bfbc1e8a84cc63046c8c4a0 Mon Sep 17 00:00:00 2001 From: Chao Sun Date: Fri, 1 Mar 2024 14:47:17 -0800 Subject: [PATCH 1/2] build: Add checker for PR title --- .github/workflows/pr_build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index aa69aea31..025a4b3f6 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -126,3 +126,17 @@ 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" + exit 1 + fi + From 6674d1f0cfd71719696ac12bcc330508ba564eff Mon Sep 17 00:00:00 2001 From: Chao Sun Date: Fri, 1 Mar 2024 20:11:20 -0800 Subject: [PATCH 2/2] example --- .github/workflows/pr_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index 025a4b3f6..d905095e4 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -137,6 +137,7 @@ jobs: 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