feat(ci): automated comment spam protection — block spam accounts and auto-moderate PR comments#753
Closed
feat(ci): automated comment spam protection — block spam accounts and auto-moderate PR comments#753
Conversation
Contributor
🛫 PR Readiness Check
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit (or squashable) | 4 commits — consider squashing before review (or repo will squash on merge) |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | CI passing | No CI checks have run yet |
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds automation intended to reduce maintainer burden by (1) auto-moderating spam comments and (2) posting an informational PR-readiness checklist comment.
Changes:
- Add a comment auto-moderation GitHub Action that scores spam signals and minimizes comments over a threshold.
- Add a PR readiness GitHub Action that upserts a checklist comment based on PR metadata, mergeability, and CI state.
- Add/update contributor/process documentation and decision/history records describing these automations.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/squad-comment-moderation.yml |
New workflow to detect spam signals on new comments and minimize them + post a notice. |
.github/workflows/squad-pr-readiness.yml |
New workflow to upsert an informational PR readiness checklist comment. |
CONTRIBUTING.md |
Documents PR readiness checklist and comment moderation behavior. |
docs/proposals/comment-spam-protection.md |
Proposal describing the comment spam protection approach and scoring model. |
docs/proposals/pr-readiness-checks.md |
Proposal describing PR readiness check approaches and recommended implementation. |
.squad/decisions/inbox/flight-pr-readiness.md |
Decision log entry for the PR readiness approach. |
.squad/agents/flight/history.md |
Agent history entry documenting the PR readiness automation pattern. |
.changeset/pr-readiness-checks.md |
Changeset noting the PR readiness workflow addition. |
diberry
added a commit
that referenced
this pull request
Apr 2, 2026
- Add timeout-minutes: 5 to the moderate job - Add bot-type skip condition (github.event.sender.type != 'Bot') - Fix blob/main -> blob/dev in moderation notice URL - Add recursion-safety comment (GITHUB_TOKEN can't re-trigger) - Add changeset for the new workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry
added a commit
that referenced
this pull request
Apr 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 2, 2026
diberry
added a commit
that referenced
this pull request
Apr 2, 2026
Move orchestration logic (user lookup, scoring, comment minimize, notice posting) from inline actions/github-script block into the standalone scripts/comment-moderation.mjs module. The workflow now uses a plain \ un: node scripts/comment-moderation.mjs\ step with env vars. - Add run() orchestrator with injectable fetch for testability - Use native fetch (Node 18+) for GitHub REST + GraphQL API calls - Add 11 orchestration tests (skip, threshold, minimize, notice, errors) - Workflow YAML now has ZERO JavaScript — only YAML with run: steps All 46 tests pass. Closes #753 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
diberry
added a commit
that referenced
this pull request
Apr 2, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Archive: 71 decisions (>30d), 10 (7-30d) - Merge: 13 inbox decisions into canonical log - Summarize: Flight, EECOM, FIDO histories (kept recent entries) - Log: Bug-fix-pipeline session recorded - Deduplicate: 73 unique decisions - decisions.md: 385.8 KB -> 103.7 KB Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b8a6cbe to
4068ce3
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
af584e9 to
158f6d9
Compare
Reset .squad/ files to match origin/dev — these changes were not part of the PR content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds automated comment spam protection for the repo. A new GitHub Action (squad-comment-moderation.yml) scans incoming comments on issues and PRs for spam signals and auto-hides them.
What it does
Files changed
Why
Spam account
kleadproofficial-del posted a recruitment ad on PR #725. This will keep happening. Zero-maintenance automated protection beats manual cleanup.
Closes #751
Working as Booster (CI/CD Engineer)
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com