ci: update on push paths for .cpp and .hpp #9
This file contains hidden or 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: Commit Norm Checker | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - '*' | |
| jobs: | |
| verify-commit-name: | |
| name: Verify Commit Name | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v5 | |
| - name: Commit Norm Checker | |
| shell: bash | |
| run: | | |
| commit_msg=$(git log --format=%B -n 1 ${{ github.sha }}) | |
| keyword_regex="^([a-z]+\([0-9A-Za-z_.-]+\)|^[a-z]+): [0-9a-z_.-]+" | |
| if [[ ! $commit_msg =~ $keyword_regex ]]; then | |
| if [[ $commit_msg =~ ^Merge\ .* ]]; then | |
| echo "Skipping merge commit" | |
| else | |
| echo "$commit_msg" | |
| echo "Commit message does not match Angular convention. Use: keyword(scope): token" | |
| exit 1 | |
| fi | |
| fi |