chore: harden ci and refresh dependencies #69
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: 02-pr-title-validation | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - edited | |
| - synchronize | |
| - reopened | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| validate-title: | |
| name: 01-validate-title | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 01-validate-pr-title | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| const title = context.payload.pull_request?.title ?? ''; | |
| const conventionalCommitPattern = /^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\([A-Za-z0-9._/-]+\))?!?: .+/; | |
| if (conventionalCommitPattern.test(title)) { | |
| core.info(`PR title is conventional: ${title}`); | |
| return; | |
| } | |
| core.setFailed( | |
| [ | |
| 'PR title must follow Conventional Commits, e.g. "fix: handle empty docs snapshot" or "feat(cli): add setup command".', | |
| `Received: ${title || '<empty>'}`, | |
| ].join('\n') | |
| ); |