chore(deps): bump softprops/action-gh-release from 1 to 3 (#26) #180
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: Block AI Content | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| check-for-forbidden-content: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check Commit Authors and Messages | |
| run: | | |
| echo "Checking for prohibited terms in commit metadata..." | |
| RANGE="HEAD~1..HEAD" | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| RANGE="${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}" | |
| fi | |
| # Check commit body for AI watermarks | |
| if git log "$RANGE" --format="%b" | grep -iE "Generated with Claude|Co-Authored-By: Claude|noreply@anthropic\.com"; then | |
| echo "::error::Found AI watermark in commit body!" | |
| exit 1 | |
| fi | |
| # Check that no commit is authored by an AI account | |
| if git log "$RANGE" --format="%an %ae" | grep -iE "claude|anthropic\.com"; then | |
| echo "::error::Found AI author in commits!" | |
| exit 1 | |
| fi |