Skip to content

fix: enforce conventional commits as per MA201 spec #1

fix: enforce conventional commits as per MA201 spec

fix: enforce conventional commits as per MA201 spec #1

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"