Chore(deps): bump zod from 3.25.76 to 4.4.3 #1855
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: Merge History Guard | |
| on: | |
| pull_request: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| guard: | |
| if: ${{ github.event.pull_request.head.sha && !startsWith(github.head_ref, 'release/') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| fetch-depth: 0 | |
| - name: Check for merge commits | |
| shell: bash | |
| env: | |
| BASE_SHA: "${{ github.event.pull_request.base.sha }}" | |
| HEAD_SHA: "${{ github.event.pull_request.head.sha }}" | |
| PR_NUMBER: "${{ github.event.pull_request.number }}" | |
| PR_TITLE: "${{ github.event.pull_request.title }}" | |
| run: | | |
| set -euo pipefail | |
| echo "Checking range ${BASE_SHA}..${HEAD_SHA}" | |
| if git rev-list --merges "${BASE_SHA}..${HEAD_SHA}" | grep -q .; then | |
| echo "Merge commits detected in PR #${PR_NUMBER} (${PR_TITLE})." >&2 | |
| echo 'Ensure the branch is rebased or squash commits before merging.' >&2 | |
| git rev-list --merges "${BASE_SHA}..${HEAD_SHA}" | xargs -r git show --no-patch --pretty=oneline >&2 | |
| exit 1 | |
| fi | |
| echo 'No merge commits detected in PR branch.' |