Merge pull request #7 from eybersjp/claude/release-priority-blocker-O… #40
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 Commit Messages | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: true | |
| - name: Lint commit messages (Push) | |
| if: github.event_name == 'push' | |
| run: | | |
| if [ "${{ github.event.before }}" = "0000000000000000000000000000000000000000" ]; then | |
| pnpm exec tsx scripts/release/lint-commits.ts "HEAD~1..HEAD" | |
| else | |
| pnpm exec tsx scripts/release/lint-commits.ts "${{ github.event.before }}..${{ github.event.after }}" | |
| fi | |
| - name: Lint commit messages (PR) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| pnpm exec tsx scripts/release/lint-commits.ts "origin/${{ github.base_ref }}..HEAD" | |
| - name: Validate PR Title (PR) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| pnpm exec tsx scripts/release/lint-pr-title.ts "${{ github.event.pull_request.title }}" |