fix: Exclude captcha field from mail #140
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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}"`); | |
| } |