doc: Add badge for conventional commits. #306
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: Lint pull request title | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
lint-title: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check PR Title for Conventional Commit Format | |
run: | | |
if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|doc|feat|fix|perf|refactor|revert|style|test)(\(\w+\))?!?:\s.*'; then | |
echo 'The title does not conform to the Conventional Commit.' | |
echo 'Please refer to "https://www.conventionalcommits.org/"' | |
exit 1 | |
fi | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- edited |