Skip to content

ci: split check job into multiple #284

ci: split check job into multiple

ci: split check job into multiple #284

name: Semantic Commit Message
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check-title:
runs-on: ubuntu-latest
env:
regex: "^(chore|ci|docs|feat|fix|refactor|style|test): "
steps:
- name: Check title
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: >
const title = context.payload.pull_request.title;
if (title.match(process.env.regex) === null) {
throw new Error("Invalid commit message '" + title + "'.")
}