Skip to content

fix: Exclude captcha field from mail #140

fix: Exclude captcha field from mail

fix: Exclude captcha field from mail #140

Workflow file for this run

name: "Lint PR"
# Validates PR titles against the conventional commit spec
# https://github.com/commitizen/conventional-commit-types
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- name: Validate PR title (Conventional Commits)
uses: actions/github-script@v7
with:
script: |
const title = context.payload.pull_request && context.payload.pull_request.title;
if (!title) {
core.setFailed('No pull request title found.');
}
// Conventional commit regex (type(scope)?: subject)
const re = /^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([\w\-\.]+\))?!?:\s.+/;
if (!re.test(title)) {
core.setFailed(`PR title is not a valid Conventional Commit: "${title}"`);
}