This looks suspiciously like a PR formatted and written by AI - without human review. If you're genuine, re-submit this with a human touch.
Last active
February 15, 2026 23:50
-
-
Save elithrar/60acfcdc2006a69b742397627a378eec to your computer and use it in GitHub Desktop.
2026 - a GitHub action that auto-closes lazy PRs generated with AI
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
| # .github/workflows/close_pr_slop.yaml | |
| name: Close PRs thrown over the fence | |
| on: | |
| pull_request: | |
| types: [opened, edited] | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| check-pr-body: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: .github | |
| sparse-checkout-cone-mode: false | |
| - name: PRs thrown over the fence | |
| run: | | |
| BODY=$(gh pr view ${{ github.event.pull_request.number }} --json body -q .body) | |
| FIRST_LINE=$(echo "$BODY" | head -n 1 | tr '[:upper:]' '[:lower:]' | xargs) | |
| if [[ "$FIRST_LINE" == "## summary"* ]]; then | |
| gh pr comment ${{ github.event.pull_request.number }} --body-file .github/bad_pr.md | |
| gh pr close ${{ github.event.pull_request.number }} | |
| gh pr lock ${{ github.event.pull_request.number }} | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment