Check PR Title: #364 #615
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |