Repository navigation
ci: add on-slop workflow to auto-close flagged AI PRs - #229
Conversation
Mirrors oven-sh/bun's on-slop.yml: when a triage+ maintainer applies the `slop` label to a PR, post a standardized explanation (didn't verify the problem exists / didn't test the fix / bad assumptions) and close it, stripping the loop labels. A one-click human kill switch for low-quality AI-generated PRs. Never checks out PR code, so pull_request_target is safe; the labeler's triage role is re-verified defensively. Requires a `slop` label to exist in the repo (created separately). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVR5yWevceZEFbTJmpviiM
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a new GitHub Actions workflow, ChangesOn Slop GitHub Action
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Labeler
participant GitHubActions as On Slop Workflow
participant GitHubAPI
Labeler->>GitHubActions: Apply "slop" label to PR
GitHubActions->>GitHubAPI: Check labeler collaborator role
GitHubAPI-->>GitHubActions: Return role
alt Role below triage
GitHubActions->>GitHubActions: Exit without action
else Role triage or above, PR open
GitHubActions->>GitHubAPI: Post explanatory comment
GitHubActions->>GitHubAPI: Remove ai-loop related labels
GitHubActions->>GitHubAPI: Close PR
end
Related issues: None referenced. Suggested labels: ci, github-actions Suggested reviewers: None identified from available context. 🐰 A label named "slop" appears on the scene, ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Preview DeploymentPreview URL: https://857c4a79.bestax.pages.dev |
|
🎉 This PR is included in version 5.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Item 2 of 3 — a one-click human kill switch for low-quality AI PRs, mirroring oven-sh/bun's
on-slop.yml.When a triage+ maintainer applies the
sloplabel to an open PR, this workflow:It never checks out PR code, so
pull_request_targetis safe.Affected package(s):
.github/workflows/on-slop.yml)Related Issue(s)
Refs #188
Type of Change
Create a
sloplabel in the repo (Issues → Labels → New label) — e.g. color#b60205, description "Low-quality AI-generated PR; auto-closed by on-slop.yml". Until the label exists, there's nothing to apply and the workflow simply never fires (safe no-op). GitHub will also auto-create it the first time you typeslopin the label picker.Checklist
pull_request_targetlabeled → singleclosejob)pull-requests: write+issues: writeonly; no code checkout🤖 Generated with Claude Code
https://claude.ai/code/session_01NVR5yWevceZEFbTJmpviiM
Generated by Claude Code
Summary by CodeRabbit