fix: enforce conventional commits as per MA201 spec #1
Workflow file for this run
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: Check Conventional Commit | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| check-conventional-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - name: Validate PR title and body against conventional commit spec | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: | | |
| # We create the squash commit for PR as follows: | |
| # PR title as subject, blank line, then PR body. | |
| commit_msg="${PR_TITLE}" | |
| if [[ -n "${PR_BODY}" ]]; then | |
| commit_msg="${PR_TITLE} | |
| ${PR_BODY}" | |
| fi | |
| ./utilities/check-conventional-commit.sh "$commit_msg" |