Skip to content

chore: [Test] Integrate All Feature Branches for v1.0.0 Platform Deployment #5

chore: [Test] Integrate All Feature Branches for v1.0.0 Platform Deployment

chore: [Test] Integrate All Feature Branches for v1.0.0 Platform Deployment #5

name: PR Title Check
on:
pull_request:
types: [opened, edited]
jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check PR Title
uses: actions/[email protected]
with:
script: |
const title = context.payload.pull_request.title;
const regex = /^(feat|fix|chore|docs|style|refactor|perf|test|ci|build|deps|hotfix|env|security)(\([\w\-]+\))?: .+/;
if (!regex.test(title)) {
core.setFailed(`❌ Invalid PR title: "${title}".\n✅ Expected format: type(scope): description\nExamples:\n - feat(docker): preload Hugging Face models\n - fix(api): handle missing auth headers`);
} else {
console.log(`✅ PR title "${title}" is valid.`);
}