Skip to content

test: testing java method snippet arguments (related to flix/flix#8255) #338

test: testing java method snippet arguments (related to flix/flix#8255)

test: testing java method snippet arguments (related to flix/flix#8255) #338

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 + "'.")
}