Skip to content

Check PR Title: #364 #615

Check PR Title: #364

Check PR Title: #364 #615

Workflow file for this run

name: "[auto] Check PR title format"
run-name: "Check PR Title: #${{ github.event.pull_request.number}}"
permissions: {}
on:
pull_request:
types: [
opened,
edited,
ready_for_review,
reopened,
]
jobs:
verify_title:
runs-on: ubuntu-latest
steps:
- name: "Verify PR title matches conventional commits specification"
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
conventional_regex='^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\(.*\))?!?: .*$'
if [[ "$TITLE" =~ $conventional_regex ]]; then
echo "Success!"
else
echo "Incorrect PR title format" >> $GITHUB_STEP_SUMMARY
exit 1
fi