project: bump ESLint toolchain to v10 and TypeScript to v6 #256
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: Check for autosquash commits | |
| on: | |
| pull_request: | |
| jobs: | |
| check-autosquash: | |
| name: Block autosquash commits | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for autosquash commits | |
| run: | | |
| base="${{ github.event.pull_request.base.sha }}" | |
| head="${{ github.event.pull_request.head.sha }}" | |
| bad_commits=$(git log --oneline "$base".."$head" | grep -iE '^\S+ (fixup|squash|amend)!' || true) | |
| if [ -n "$bad_commits" ]; then | |
| echo "::error::PR contains autosquash commits that need to be rebased before merging:" | |
| echo "$bad_commits" | |
| exit 1 | |
| fi | |
| echo "No autosquash commits found." |