Skip to content

refactor(master): extract master role crate (#1243) #2666

refactor(master): extract master role crate (#1243)

refactor(master): extract master role crate (#1243) #2666

name: Pull Request Title Check
on:
pull_request:
branches:
- '**'
types: [opened, synchronize, reopened, edited]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install commitlint dependencies
run: npm install
- name: Validate PR title
run: |
# Check PR title format - will fail the job if format is invalid
echo "Checking PR title: ${{ github.event.pull_request.title }}"
# Use commitlint to validate PR title format
echo "${{ github.event.pull_request.title }}" | npx commitlint --verbose || {
echo ""
echo "❌ PR title format validation failed!"
echo ""
echo "📖 Please refer to our contribution convention for the correct format:"
echo " https://github.com/CurvineIO/curvine/wiki/Contribute-convention#contribute-convention"
echo ""
echo "📝 Expected format: <type>: <description> (#<issueNumber>)"
echo " Example: feat: add new compression algorithm (#123)"
echo ""
echo "🔧 Supported types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert"
echo ""
exit 1
}