Skip to content

refactor: simplify websocket code #330

refactor: simplify websocket code

refactor: simplify websocket code #330

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