Skip to content

fix(native): align Rust role classification with JS #2439

fix(native): align Rust role classification with JS

fix(native): align Rust role classification with JS #2439

Workflow file for this run

name: Commitlint
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate-commits:
name: Validate commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: "22"
- run: npm install
- name: Validate PR commits
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
validate-branch-name:
name: Validate branch name
runs-on: ubuntu-latest
steps:
- name: Check branch name
run: |
BRANCH="${{ github.head_ref }}"
PATTERN="^(feat|fix|docs|refactor|test|chore|ci|perf|build|release|dependabot|revert|benchmark)/"
if [[ ! "$BRANCH" =~ $PATTERN ]]; then
echo "::error::Branch name '$BRANCH' does not match the required pattern."
echo "Branch names must start with one of: feat/, fix/, docs/, refactor/, test/, chore/, ci/, perf/, build/, release/, dependabot/, revert/, benchmark/"
exit 1
fi
echo "Branch name '$BRANCH' is valid."