Skip to content

Commit

Permalink
build: Add checker for PR title (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunchao authored Mar 2, 2024
1 parent 23c748b commit cad16d5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cad16d5

Please sign in to comment.